May 17, 2006 #1 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
Can anybody pls throw some light on this? What does @ symbol mean in C#? For example: Console.WriteLine(@"C\:\\WINNT\\System32"); TIA Thanks, MB
May 17, 2006 #2 wawalter Programmer Aug 2, 2001 125 US 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"); Upvote 0 Downvote
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");
May 17, 2006 Thread starter #3 s2001 Programmer Dec 7, 2001 132 US thank you Thanks, MB Upvote 0 Downvote