What does the @ prefix do on string literals in C#

@ is not related to any method.

It means that you don’t need to escape special characters in the string following to the symbol:

@"c:\temp"

is equal to

"c:\\temp"

Such string is called ‘verbatim’ or @-quoted. See MSDN.

Leave a Comment