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); }
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(); }