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);
时间: 2024-10-21 17:28:24