字节数组生成的字符串在console出来竟然有表情

static void ConsoleSmileExpressionTest()
{
byte[] namebytearray = new byte[] { 1, 2, 3, 4, 5, 6 };
string smileexpressstring = Encoding.UTF8.GetString(namebytearray);
for (int i = 0; i < smileexpressstring.Length; i++)
{
Console.WriteLine(smileexpressstring[i]);
}
Console.ReadKey();
}

水平有限,无意间发现的。不知道谁在卖萌,这样好吗~~

posted @ 2015-08-14 14:20  南风叶  阅读(280)  评论(0编辑  收藏  举报