Answer the question
In order to leave comments, you need to log in
What can replace the XDocument.Save(string) function on Windows Phone?
I'm using XDocument.Load to read a file, then I act on the file. But how do you save changes to a file? The wonderful function XDocument.Save(string), where you just need to specify the path to the file, does not work on WP. There is XDocument.Save(Stream), but I don't understand where the stream has to do with it. Thanks in advance.
Answer the question
In order to leave comments, you need to log in
A stream can also be a file stream.
using ( FileStream stream = File.OpenWrite(filePath) )
{
XDocument.Save(stream);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question