C# Convert Char to Byte (Hex representation)

后端 未结 5 1267
半阙折子戏
半阙折子戏 2021-02-07 00:23

This seems to be an easy problem but i can\'t figure out.

I need to convert this character < in byte(hex representation), but if i use



        
5条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-07 01:02

    char ch2 = 'Z';
    Console.Write("{0:X} ", Convert.ToUInt32(ch2));
    

提交回复
热议问题