I have a snippet of XML that looks like this:
<url>
\\network\folder
<url>
When I read this into a string using string url = XElement("url").Value, the value that is stored in the string variable is:
\\\\network\\folder
How can I return it as a verbatim url?
If you are seeing this during debug mode (in a watch windows for example), it’s ok : the “\\” is used in C# to represent a “\”. The same way a “\t” is tab and the “\n” is carriage return.
Look at the whole list of single-escape-sequences.