C#: Convert Byte array into a float

前端 未结 1 1618
故里飘歌
故里飘歌 2020-11-27 07:06

I have a byte array of size 4

byte[] source = new byte[4];

Now I wanted to convert this source into a 4-byte float value...

Can any

相关标签:
1条回答
  • 2020-11-27 07:17

    Try

    float myFloat = System.BitConverter.ToSingle(mybyteArray, startIndex);

    0 讨论(0)
提交回复
热议问题