Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 05, 2010 10:18 PM by WhatThe12
Jan 04, 2010 06:07 PM|LINK
What is the '@' character in this context? I've only ever seen it used in front of a string.
Jan 04, 2010 07:40 PM|LINK
It's called a verbatim identifier. See the C# spec,
sec. 2.4.2 for more info. The VB equivalent is an escaped identifier (VB spec,
Jan 04, 2010 08:05 PM|LINK
it lets you use reserved words as identifiers. in this context, the @ symbol is preceeding 'class' in the initializer, which would otherwise throw an error as class is a reserved word.
a more lengthy explaination (and different uses) are in the links just posted above.
Jan 05, 2010 10:18 PM|LINK
Oh cool. Thanks! I'd had a look for a reference but couldn't find it.