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.
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值