The escape sequence of Unicode characters represents a Unicode character. Unicode-escape-sequence: (Unicode escape sequence:)
/u hex-digit hex-digit hex-digit hex-digit (/u hexadecimal digit hexadecimal digit hexadecimal digit hexadecimal digit)
/u hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit (/u hexadecimal digit hexadecimal digits hexadecimal digit hexadecimal digit hexadecimal digit hexadecimal digit hex number hex digit
The Unicode escape sequence represents a single Unicode character that consists of hexadecimal digits following the "/U" or "/U" characters. Because C # uses the 16-bit encoding of Unicode code points in character and string values, Unicode characters from u+10000 to u+10ffff cannot be used in characters and are represented in strings with a Unicode surrogate pair. Unicode characters above 0x10ffff are not supported for code data points.
Do not perform multiple conversions. For example, the string "/u005cu005c" is equivalent to "/u005c" instead of "/". Unicode value/u005c is the character "/".
Example
Class Class1
{
static void Test (bool/u0066) {
char c = '/u0066 ';
if (/u0066)
System.Console.WriteLine (C.tostring ());
}
}
Shows some uses of/u0066, which is the escape sequence of the letter "F". This program is equivalent to
Class Class1
{
static void Test (bool f) {
char C = ' F ';
if (f)
System.Console.WriteLine (C.tostring ());
}
}