Possible Duplicate:
What's the @ in front of a string for .NET?
I found this in a C# study book
DirectoryInfo dir = new DirectoryInfo(key.Key.ToString() + @":\");
The book however did not explain what the ‘@’ symbol was for. I tried searching MSDN C# Operators but its not listed there. I can guess that it allows the developer to not have to escape a ‘\’ or does it allow to not have any escape sequences?
What is this for and why would I use @":\" instead of ":\\"?
Thanks for the help
Edit: See the comment below for a similar question
It means to interpret the string literally (that is, you cannot escape any characters within the string if you use the @ prefix). It enhances readability in cases where it can be used.
For example, if you were working with a UNC path, this:
is nicer than this: