the symbol

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,
what does the @ symbol in front of a string mean? @"mystringvalue"

thanks,
rodchar
 
means to read characters such as '\' correctly

So if you had a path and you dont want the string read as an escape sequence
you put the @ in front.
 
hey all,
what does the @ symbol in front of a string mean? @"mystringvalue"

thanks,
rodchar

It means take everything after it as the string, so

Console.WriteLine("W\tW");
Console.WriteLine(@"W\tW");

In the first case will write W tab W and in the second will write W\tW
where tab is an actual tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top