110,534
社区成员
发帖
与我相关
我的任务
分享
16进制的00000001 转换成10进制就是1 1*1000=1000;1000升=1立方米 16进制的028A0640 转换成10进制就是42600000 42600000/10000=4260 所以是1.4260m^3
能来个人吗
private void Form1_Load(object sender, EventArgs e)
{
byte[] buffer = new byte[] { 0x00, 0x00, 0x00, 0x01};
byte[] buffera=new byte[]{ 0x02, 0x8A, 0x06, 0x40 };
float height = BufferToInt(buffer) ; 等1
float flt = BufferToInt(buffera) ;426000000000自己换算吧
}
public int BufferToInt(byte[] buffer)
{
buffer = buffer.Reverse().ToArray();
return BitConverter.ToInt32(buffer, 0);
}