byte[] command = new byte[2];
double test1 = 1234;
UInt16 result = (UInt16)(test1);
command[0] = (byte)(result >> 8);//高位
command[1] = (byte)(result & 0xff);//低位
Console.WriteLine("{0}", FormatBytes(command) );
将byte数组(长度2,高字节在前,低字节在后),转成double数据;
byte[] command2 = new byte[2] { 0x15, 0xee };
double result2 = command2[0] * 256 + command2[1];
Console.WriteLine("{0}", result2);