Bootstrap

C#字节转换为double方法

C#字节数组转换为double方法
byte[] ssdsd = new byte[] { 0x00, 0x00, 0x90, 0x02, 0x00, 0x00, 0x00, 0x00 };
byte[] ssdsd1 = new byte[] { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
double doubleValue = BitConverter.ToDouble(ssdsd,0);
double doubleValue1 = BitConverter.ToDouble(ssdsd1,0);

          // 摘要:
    //     Returns a double-precision floating point number converted from eight bytes at
    //     a specified position in a byte array.
    //
    // 参数:
    //   value:
    //     An array of bytes.
    //
    //   startIndex:
    //     The starting position within value.
    //
    // 返回结果:
    //     A double precision floating point number formed by eight bytes beginning at startIndex.
    //
    // 异常:
    //   T:System.ArgumentException:
    //     startIndex is greater than or equal to the length of value minus 7, and is less
    //     than or equal to the length of value minus 1.
    //
    //   T:System.ArgumentNullException:
    //     value is null.
    //
    //   T:System.ArgumentOutOfRangeException:
    //     startIndex is less than zero or greater than the length of value minus 1.
;