更新时间:2023-11-09 13:23:52
的 BitConverter.ToInt32 方法是做到这一点的好办法
The BitConverter.ToInt32 method is a good way to do this
if (BitConverter.IsLittleEndian)
Array.Reverse(array); //need the bytes in the reverse order
int value = BitConverter.ToInt32(array, 0);