@ symbol in front of string

What does it mean when you place an @ symbol in front of a string ie

string bob = @"james";
millerthegorillaAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
straigth from the docs:
http://msdn.microsoft.com/en-us/library/362314fe(VS.71).aspx
<...>
The advantage of @-quoting is that escape sequences are not processed, which makes it easy to write, for example, a fully qualified file name:
<..>
0
 
rstomarConnect With a Mentor Commented:
It means it is a literal string.

If there are any special characters in the string like " (double quotes) the you don't have to use escape character \ .
E.g if you want to assign the string abc"def to a variable you can do it as follows in C# :
String strVar = "abc\"def";
OR
String strVar = @"abc"def";
0
All Courses

From novice to tech pro — start learning today.