C# 十六进制转换ASCII
string
s =
"这里放十六进制字符串"
;
byte
[]buff=
new
byte
[s.Length/2];
int
index=0;
for
(
int
i = 0; i < s.Length; i += 2)
{
buff[index] = Convert.ToByte(s.Substring(i, 2), 16);
++index;
}
string
result = Encoding.Default.GetString(buff);
Console.Write(result);