/**//*--===------------------------------------------===-- so lang to write code , now i'm free to code again,ha. this time, let's see a demo, Encoding. xuminghui, 2008-05-14 @home --===------------------------------------------===---*/ namespace xumh { publicclass EncodingTest { publicstaticvoid Main() { System.Console.Write("Input String, test Encoding:"); string input = System.Console.ReadLine(); //here, get the Byte Array of the String byte[] encodeBytes = System.Text.Encoding.UTF8.GetBytes(input); System.Console.WriteLine("Encoding Bytes:{0}",System.BitConverter.ToString(encodeBytes)); //here, get the String of the Bytes string gets = System.Text.Encoding.UTF8.GetString(encodeBytes); System.Console.WriteLine("Encoding String:{0}",gets); System.Console.ReadLine(); } } }
posted on
2008-05-14 21:39许明会
阅读(4475)
评论(1)
编辑收藏举报
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步