Hi Axel,
In addition to Stanimir's second point, here I quote the C# 3.0
specification 2.4.2 in case you and other community members who are
interested:
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. Use of the @ prefix for
identifiers that are not keywords is permitted, but strongly discouraged as
a matter of style.
The example:
class @class
{
public static void @static(bool @bool) {
if (@bool)
System.Console.WriteLine("true");
else
System.Console.WriteLine("false");
}
}
class Class1
{
static void M() {
cl\u0061ss.st\u0061tic(true);
}
}
defines a class named "class" with a static method named "static" that
takes a parameter named "bool". Note that since Unicode escapes are not
permitted in keywords, the token "cl\u0061ss" is an identifier, and is the
same identifier as "@class".
Two identifiers are considered the same if they are identical after the
following transformations are applied, in order:
" The prefix "@", if used, is removed.
" Each unicode-escape-sequence is transformed into its corresponding
Unicode character.
" Any formatting-characters are removed.
The C# Language Specification Version 3.0 can be downloaded here:
http://download.microsoft.com/download/3/8/8/388e7205-bc10-4226-b2a8-75351c6
69b09/CSharp%20Language%20Specification.doc
Best regards,
Jie Wang (
[email protected], remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business days is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.