字符串转换函数:Convert.ToString(int value, int format) int value:要转换的整数,一般是(byte)8位无符号整数 int format:value的进制,一般为2、4、8、10、16 简单代码如下: namespace SubString { class Program { static void Main(string[] args) { string CRCcode; int s = 255; CRCcode = Convert.ToString(s,16); WriteLine(CRCcode); } } } 输出结果: FF