日期:2014-05-18 浏览次数:20942 次
string ss = "01ac0c01";
int len = ss.Length / 2;
byte[] bs = new byte[len];
int j = 0;
for (int i = 0; i < ss.Length; i += 2)
{
string str = ss.Substring(i, 2);
bs[j] = (byte)int.Parse(str, System.Globalization.NumberStyles.HexNumber);
j++;
}