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.
cheers,
-jc
Marked as answer by ricka6 on Jan 04, 2010 09:03 PM
WhatThe12
Contributor
3416 Points
984 Posts
Re: Html.ActionLink and CSS classes
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.
levib
Star
7702 Points
1099 Posts
Microsoft
Re: Html.ActionLink and CSS classes
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, sec. 2.2).
CanadianJame...
Member
14 Points
4 Posts
Re: Html.ActionLink and CSS classes
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.
cheers,
-jc
WhatThe12
Contributor
3416 Points
984 Posts
Re: Html.ActionLink and CSS classes
Jan 05, 2010 10:18 PM|LINK
Oh cool. Thanks! I'd had a look for a reference but couldn't find it.