/// <summary> /// 16进制字符串转换为Byte /// </summary> /// <param name="hexString">16进制源字符串</param> /// <returns>Byte类型数组</returns> public static byte HexToByte(this string hexString) { string strTemp = hexString; int len = hexString.Length; if (len % 2 != 0) { strTemp = "0" + hexString; } return(StrHelper.HexStringToByte(strTemp)[0]); }