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);
英文文档: chr(i) Return the string representing a character whose Unicode code point is the integer i. For example, chr(97) returns the string 'a', while chr(8364) returns the string '€'. This is the inverse of ord(). The valid range for the argument is