I am writing a string to a xml document.
I now have several different strings and I want to write all of them to one xml file. Is there any way of doing this instead of having numerous single xml files?
Instead of writing strings out, use XDocument to construct the XML structure and Save to a file.
This will keep you from making mistakes in the format of the XML file itself, as XML is not simple text, but a structured file format.
Use System.IO.File.AppendAllText instead of System.IO.File.WriteAllText
Use file.AppendText to add to a file.