public static void SerializeToXML(ItemDataCollection settings, string FolderPath) { string FilePath = Path.Combine(FolderPath, "Cache_Items.xml"); var serializer = new XmlSerializer(typeof(ItemDataCollection)); var textWriter = new StreamWriter(FilePath); serializer.Serialize(textWriter, settings); textWriter.Close(); }
public static void SerializeToXML(ItemDataCollection settings) { var serializer = new XmlSerializer(typeof(ItemDataCollection)); var textWriter = new StreamWriter(DefaultFilePath); serializer.Serialize(textWriter, settings); textWriter.Close(); }