示例#1
0
 public static void SaveItems <T>(IEnumerable <T> items, string path) where T : class
 {
     Txt.SaveItemsToTextFile(items, $"{path}.txt");
     Xml.SaveItemsToXml(items, $"{path}.xml");
 }
示例#2
0
 public static void AddItem <T>(T item, string path)
 {
     Txt.SaveItemToTxtFile(item, $"{path}.txt");
     Xml.AddItemToXml(item, $"{path}.xml");
 }