Esempio n. 1
0
 public static void WriteToFile(string Path, List<MenuItem> data, string Header)
 {
     videoCollection videos = new videoCollection();
       videos.videos = data;
       videos.Header = Header;
       WriteToFile(Path, videos);
 }
Esempio n. 2
0
 public static void WriteToFile(string Path, videoCollection data)
 {
     BinaryFormatter formatter = new BinaryFormatter();
       using (Stream fStream = new FileStream(Path, FileMode.Create, FileAccess.Write, FileShare.None))
       {
     formatter.Serialize(fStream, data);
       }
 }