According to my C-Sharp book, I ought to be able to escape filenames in two ways:
string myFile = "C:\\MyDir\\MyFile.txt"
-or
string myFile = @"C:\MyDir\MyFile.txt"
However I've tried both of these in my current VS2008 project, and both evaluate to "C:\\MyDir\\MyFile.txt". I've checked by hovering over the variable at a breakpoint and also by printing in the Command Window. What am I doing wrong here???
string myFile = "C:\\MyDir\\MyFile.txt"
-or
string myFile = @"C:\MyDir\MyFile.txt"
However I've tried both of these in my current VS2008 project, and both evaluate to "C:\\MyDir\\MyFile.txt". I've checked by hovering over the variable at a breakpoint and also by printing in the Command Window. What am I doing wrong here???