Saving an xml file without
- by little
Hi,
How do I work with an xml file that when updating it, after saving the commented lines would still be present.
Here's my code snippet for saving the file:
public static void WriteSettings(Settings settings, string path)
{
XmlSerializer serializer = new XmlSerializer(typeof(Settings));
TextWriter writer = new StreamWriter(path);
serializer.Serialize(writer, settings);
writer.Close();
}