Ok, I feel like this is a really stupid basic question but I cannot find the answer.
I am building a web service in c# and I am using MsgReader to read Outlook email files. To open a message I use this line:
Storage.Message message = new Storage.Message(filePath);
filePath will be coming from a remote location and will be something like "c:\apple.msg". This does not work. If I use "c:\\apple.msg" it works just fine.
It is interpreting that as an escape character. I tried String.Replace to change the \ to \\ but the string is a null value before it can even get to that point. This seems like a very simple problem, because I enter file paths as command line arguments all the time. How do you do this?
Additional info: The path will come from a web service call from a PHP application using SOAP. It dawned on me that I can replace the slash with double slashes before I make the call, but I would like to know how other people handle this problem.