A Unicode character escape sequence represents a Unicode character. Unicode character escape sequences are permitted in identifiers, string literals, and character literals.
Multiple translations are not performed. For instance, the string literal "\u005Cu005C
" is equivalent to "\u005C
" rather than "\\
". (The Unicode value \u005C
is the character "\".)
The example
class Class1 { static void Test(bool \u0066) { char c = '\u0066'; if (\u0066) Console.WriteLine(c.ToString()); } }
shows several uses of \u0066
, which is the character escape sequence for the letter "f
". The program is equivalent to
class Class1 { static void Test(bool f) { char c = 'f'; if (f) Console.WriteLine(c.ToString()); } }