예제 #1
0
 public static void SerializeToXML(UnitDataCollection settings, string FolderPath)
 {
     string FilePath = Path.Combine(FolderPath, "Cache_Units.xml");
     var serializer = new XmlSerializer(typeof(UnitDataCollection));
     var textWriter = new StreamWriter(FilePath);
     serializer.Serialize(textWriter, settings);
     textWriter.Close();
 }
예제 #2
0
 public static void SerializeToXML(UnitDataCollection settings)
 {
     var serializer = new XmlSerializer(typeof(UnitDataCollection));
     var textWriter = new StreamWriter(DefaultFilePath);
     serializer.Serialize(textWriter, settings);
     textWriter.Close();
 }