updated writer

Signed-off-by: Matt Bruce <mbrucedogs@gmail.com>
This commit is contained in:
Matt Bruce 2018-11-30 14:58:35 -06:00
parent 2f4e76d0a8
commit 65947544c0

View File

@ -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)