X hits on this document

798 views

0 shares

0 downloads

0 comments

51 / 396

C# LANGUAGE SPECIFICATION

class Class1 { static void Test(bool \u0066) { char c = '\u0066'; if (\u0066) System.Console.WriteLine(c.ToString()); } }

shows several uses of \u0066, which is the escape sequence for the letter “f”. The program is equivalent to

class Class1 { static void Test(bool f) { char c = 'f'; if (f) System.Console.WriteLine(c.ToString()); } }

2.4.2 Identifiers

The rules for identifiers given in this section correspond exactly to those recommended by the Unicode Standard Annex 15, except that underscore is allowed as an initial character (as is traditional in the C programming language), Unicode escape sequences are permitted in identifiers, and the “@” character is allowed as a prefix to enable keywords to be used as identifiers.

identifier: available-identifier @   identifier-or-keyword

available-identifier: An identifier-or-keyword that is not a keyword

identifier-or-keyword: identifier-start-character   identifier-part-charactersopt

identifier-start-character: letter-character _ (the underscore character U+005F)

identifier-part-characters: identifier-part-character identifier-part-characters   identifier-part-character

identifier-part-character: letter-character decimal-digit-character connecting-character combining-character formatting-character

letter-character: A Unicode character of classes Lu, Ll, Lt, Lm, Lo, or Nl A unicode-escape-sequence representing a character of classes Lu, Ll, Lt, Lm, Lo, or Nl

combining-character: A Unicode character of classes Mn or Mc A unicode-escape-sequence representing a character of classes Mn or Mc

38Copyright Microsoft Corporation 1999-2003. All Rights Reserved.

Document info
Document views798
Page views798
Page last viewedSun Dec 04 00:57:06 UTC 2016
Pages396
Paragraphs9401
Words133190

Comments