コード例 #1
0
 public void SaveToXML()
 {
     Console.WriteLine("*** Saving data to XML ***");
       string filePath = GetData.filePath();
       // serialization
       xmlProcessing<List<Worker>> xmlFile = new xmlProcessing<List<Worker>>(filePath);
       //add trycatch for save and load
       //try to save
       xmlFile.Save(Workers);
 }
コード例 #2
0
 public void LoadXML()
 {
     Console.WriteLine("*** Loading data from XML ***");
       string filePath = GetData.filePath();
       // serialization
       xmlProcessing<List<Worker>> xmlFile = new xmlProcessing<List<Worker>>(filePath);
       //add trycatch for save and load
            //try to load existing file
       xmlFile.Load();
 }