XDocument.Save to a specific directory?
I am using these XML classes for the first time and cannot find this information.
I am doing:
xmlDoc = new XDocument(new XDeclaration("1.0", "utf-8", "yes"));
xmlDoc.Add(new XElement("Images"));
xmlDoc .Save("C:\\Backup\\images.xml");
But it doesn't work. It only works if I only use the filename like "images.xml", but of course the file is saved in the execution path.
+2
a source to share