C# 16进制字符串转数字

Int16 i16 = Convert.ToInt16("F74B", 16);//结果为-2229     16位4个字符串长度
byte[] bytes16 = BitConverter.GetBytes(i16);//结果为 0x4B 0xF7   低位在前  高位在后
int i32 = Convert.ToInt32("F74B0000", 16);//结果为-146079744   32位8个字符串长度
byte[] bytes32 = BitConverter.GetBytes(i32);//结果为 0x00 0x00 0x4B 0xF7   低位在前  高位在后
//以此递推  如果是64位 16个字符串长度

本文地址 http://www.luofenming.com/show.aspx?id=80074e6fe6e64d92bbba2514b1156406