What does the @ symbol before a variable name mean in C#?

Greg picture Greg · Jan 9, 2009 · Viewed 196.7k times · Source

Possible Duplicate:
What's the use/meaning of the @ character in variable names in C#?

I understand that the @ symbol can be used before a string literal to change how the compiler parses the string. But what does it mean when a variable name is prefixed with the @ symbol?

Answer

Michael Meadows picture Michael Meadows · Jan 9, 2009

The @ symbol allows you to use reserved word. For example:

int @class = 15;

The above works, when the below wouldn't:

int class = 15;