If we look at the C# language specification, ECMA-334, in section 7.4.2 "Unicode character escape sequences", we find
A Unicode escape sequence represents a Unicode code point. Unicode escape sequences are processed in identifiers (§7.4.3), character literals (§7.4.5.5), and regular string literals (§7.4.5.6). A Unicode escape sequence is not processed in any other location (for example, to form an operator, punctuator, or keyword).
unicode-escape-sequence:: \u hex-digit hex-digit hex-digit hex-digit
\U hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit hex-digit
So you have to use four hex digits with the \u
.
In your example, it takes "001f" as those four hex digits.
The "\u001"
in your example should have given an error in Visual Studio along the lines of "Unrecognized escape sequence."