naming – What’s the use/meaning of the @ character in variable names in C#? – Stack Overflow
Posted by jpluimers on 2012/03/28
Duh, I always thought @ could only be used for strings.
Not so: just like with the & in Delphi is used to escape keywords, the additional use of @ in C# is to escape identifiers:
The prefix “@” enables the use of keywords as identifiers, which is useful when interfacing with other programming languages. The character @ is not actually part of the identifier, so the identifier might be seen in other languages as a normal identifier, without the prefix. An identifier with an @ prefix is called a verbatim identifier.
–jeroen
via: naming – What’s the use/meaning of the @ character in variable names in C#? – Stack Overflow.
Leave a comment