Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

@ symbol

Status
Not open for further replies.

s2001

Programmer
Dec 7, 2001
132
US
Can anybody pls throw some light on this?
What does @ symbol mean in C#? For example:
Console.WriteLine(@"C\:\\WINNT\\System32");

TIA



Thanks,
MB
 
The @ prevents C# from interpreting the \ as an escape character. Using \\ in the string does the same thing.

do this...
Console.WriteLine(@"C\:\WINNT\System32");
or this...
Console.WriteLine("C\\:\\WINNT\\System32");

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top