| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | public static double Bytes2Double(byte[] value, int offset = 0) |
| | | { |
| | | return BitConverter.ToSingle(value.Reverse().ToArray(), 0);//采用了IEEE-754二进制浮点数算术标准 |
| | | } |
| | | |
| | | public static int Bytes2Int4(byte[] src, int offset = 0) |
| | | { |
| | | src = src.Reverse().ToArray(); |
| | |
| | | | (src[offset + 3] & 0xFF)); |
| | | return value; |
| | | } |
| | | |
| | | public static double Bytes2Double(byte[] value, int offset = 0) |
| | | { |
| | | return BitConverter.ToSingle(value.Reverse().ToArray(), 0);//采用了IEEE-754二进制浮点数算术标准 |
| | | } |
| | | |
| | | |
| | | public static int Bytes2Int32(byte[] bytes) |
| | | { |
| | | return Convert.ToInt32(Byte2HexStr(bytes.Reverse().ToArray()), 16); ; |