//两个数比如25 string number = "25"; byte h8 = (byte)(number[0]-'0'); byte l8 = (byte)(number[1] -'0'); byte test = 0; test |= (byte)(h8 << 4); test |= l8;