首页 > 代码库 > 汉字转16进制ASCII码

汉字转16进制ASCII码

 

using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TestConsole{    class Program    {        static void Main(string[] args)        {            byte[] b = ASCIIEncoding.Default.GetBytes("");            foreach (var s in b)            {                Console.WriteLine(Convert.ToString(s,16));            }            Console.ReadLine();        }    }}