I'm having a bit of trouble trying to write a single " to a file in C# as I can't seem to get the escape sequence to work. The idea being I want to write the line survey id="6737AF7F-F422-4995-B781-B3DE315DFE6D" to a file where the GUID itself is user input.
my current code for this is
XML.Add("<survey id=" + "\"\"" + surveyGUID.Text + "\"\"" + ">");
which writes survey id=""6737AF7F-F422-4995-B781-B3DE315DFE6D"".
Every variation I've tried either won't build, comes out the same way or writes survey id=\"6737AF7F-F422-4995-B781-B3DE315DFE6D\". Can this be done? Is there another escape sequence I don't know about?
Any help would be greatly appreciated.