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(); }
public static void SerializeToXML(UnitDataCollection settings) { var serializer = new XmlSerializer(typeof(UnitDataCollection)); var textWriter = new StreamWriter(DefaultFilePath); serializer.Serialize(textWriter, settings); textWriter.Close(); }