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.
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
