Tonight while laying out a program to open and parse a file I came across something I've never seen before. In the text I'm using for learning examples, all of the file specs in statements begin with @ followed by the actual file path. The book doesn't explain it, and the character is missing from the index. I checked examples from Microsoft, and the mysterious @ symbol is there, as well, also without explanation.
I've programmed in a lot of languages, but I've never seen this before. What's it for? What's wrong with using just a string?
All the examples I've looked at tonight use a hard-coded filename (e.g. "C:\Target\MyFile.txt"), but I'm using a string variable acquired by using an OpenFileDialog. Do I still need to prepend the '@' symbol to my variable in order to reference the file properly? Does this apply to all .Net languages, or just C#?
Ordinarily I'd just spend the hours required to write the code several different ways until it works, but it's late and I'm short of sleep, and I'd really like to make some serious progress tomorrow night after work. I'd appreciate an explanation of the use of this character, and why/when it's required. That would save me many hours I don't have available. :)