Saving an xml file without

Posted by little on Stack Overflow See other posts from Stack Overflow or by little
Published on 2010-05-09T04:48:07Z Indexed on 2010/05/09 4:58 UTC
Read the original article Hit count: 222

Filed under:
|

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();            
    }

© Stack Overflow or respective owner

Related posts about Xml

Related posts about c#