For a C# 2010 desktop application, I have a user that wants me to work with a directory path name that looks like C:\C-Received.
I am going to place the C:\C-Received in the application configuration file which is in an xml format.
I am wondering if the dash (-) that is part of the C-Received needs to have any special characters around it since the value will be contained in an xml file?
If so, what special characters do I need to place around the '-' dash?
Also can you point me to the reference that shows which characters in an xml file need special characters around them to be recognized?
C# file name
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Suthish NairRank #92 · 22.8K reputationPosted Mar 26, 2013, 7:46 AM EDT
Try using – for "-"
VulpesRank #55 · 29.2K reputationPosted Mar 26, 2013, 7:45 AM EDT
Although there are limitations on what tags can include, you can include most other characters within an XML file.
However, there are a few characters (< ,> , & , ' and ") which should be replaced by predefined entities as they would otherwise cause problems to an XML parser.
Check this link for a full account of what characters can be included in an XML file and which ones require special treatment:
http://en.wikipedia.org/wiki/XML