Exemplo n.º 1
0
 public void Deserialize(Stream s)
 {
     Serialize(new FileStream("backup.xml", FileMode.Create));
     using (StreamReader sr = new StreamReader(s))
     {
         LessCont lessCont = (LessCont)xmlSerializer.Deserialize(sr);
         lessCont.Update();
     }
 }
Exemplo n.º 2
0
 public void Serialize(Stream s)
 {
     using (StreamWriter sw = new StreamWriter(s))
     {
         LessCont Cont = new LessCont(dataManager);
         Cont.Create();
         xmlSerializer.Serialize(sw, Cont);
     }
 }