Take myChar as a char, referring to your special character ...
Console.WriteLine("{0} U+{1:x4} {2}", myChar, (int)myChar, (int)myChar);
Above, we print the character itself, followed by a Unicode code point, and then an integer value.
Reduce the format string and parameters to display only the code "U + ..." ...
Console.WriteLine("U+{0:x4}", (int)myChar);
source
share