Skip to main content
Minor edit: grammar/spelling/case/punctation/etc.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

The @ tells the compiler to ignore any escape characters in a string.

justJust wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

ifIf you have

string s = @"cat dog fish" 

it will actually print out as (note that it even includes the whitespace used for indentation):

cat dog fish 

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as (note that it even includes the whitespace used for indentation)

cat dog fish 

The @ tells the compiler to ignore any escape characters in a string.

Just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

If you have

string s = @"cat dog fish" 

it will actually print out as (note that it even includes the whitespace used for indentation):

cat dog fish 
added indentation whitespace
Source Link
Lucas
  • 17.5k
  • 5
  • 48
  • 41

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as (note that it even includes the whitespace used for indentation)

cat
dog
fish

cat dog fish 

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as

cat
dog
fish

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as (note that it even includes the whitespace used for indentation)

cat dog fish 
fixed spelling
Source Link
Ferruccio
  • 101.1k
  • 38
  • 232
  • 305

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interperateinterpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as

cat
dog
fish

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interperate the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as

cat
dog
fish

The @ tells the compiler to ignore any escape characters in a string.

just wanted to clarify this one... it doesn't tell it to ignore the escape characters, it actually tells the compiler to interpret the string as a literal.

if you have

string s = @"cat dog fish" 

it will actually print out as

cat
dog
fish

Post Made Community Wiki by CommunityBot
Source Link
lomaxx
  • 116.2k
  • 58
  • 148
  • 181
Loading