diff --git a/SingsALot/Classes/UserSettings.cs b/SingsALot/Classes/UserSettings.cs index c758f09..8763236 100644 --- a/SingsALot/Classes/UserSettings.cs +++ b/SingsALot/Classes/UserSettings.cs @@ -4,6 +4,7 @@ using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Xml; using System.Xml.Serialization; namespace SingsALot.Classes @@ -15,10 +16,10 @@ namespace SingsALot.Classes public void Save(string filename) { - using (StreamWriter sw = new StreamWriter(filename)) + using (XmlWriter xmlWriter = XmlWriter.Create(filename)) { XmlSerializer xmls = new XmlSerializer(typeof(UserSettings)); - xmls.Serialize(sw, this); + xmls.Serialize(xmlWriter, this); } } public UserSettings Read(string filename)