using System; public class Test { public static void Main() { // Code Point U+1F47E Console.WriteLine("\\U0001F47E = \U0001F47E"); Console.WriteLine(""); // Specifying the UTF-16 Surrogate Pair raises a "CS1009 // Unrecognized escape sequence" error in LINQPad and Visual // Studio 2015. // // Here it returns the default replacement character due to ignoring // the first 4 hex digits and only seeing 0xDC7E, which is a // surrogate code unit. Console.WriteLine("\\UD83DDC7E = \UD83DDC7E"); Console.WriteLine(""); // The following is invalid, and raises an error in LINQPad and in // Visual Studio 2015. But here it returns an empty string due to // ignoring the first 4 hex digits and only seeing 0x0000. Console.WriteLine("\\UD83D0000 = \UD83D0000"); Console.WriteLine(""); // The following are invalid, and raises an error in LINQPad and in // Visual Studio 2015. But here it returns an "A" due to ignoring // the first 4 hex digits and only seeing 0x0041. Console.WriteLine("\\UD83D0041 = \UD83D0041"); Console.WriteLine("\\U80000041 = \U80000041"); Console.WriteLine("\\UFFFF0041 = \UFFFF0041"); Console.WriteLine(""); // The following is invalid, and raises an error HERE (as expected), // due to the first 4 hex digits being below the 0x8000 mark. //Console.WriteLine("\\U7FFF0041 = \U7FFF0041"); } }