Reversing byte order in .NET

后端 未结 7 1154
天命终不由人
天命终不由人 2020-12-03 11:29

In the code below, why do X and Y take on different values than what I would think intuitively?

If the bytes 0-7 are written to the buffer, shouldn\'t the resulting

7条回答
  •  旧时难觅i
    2020-12-03 12:07

    Are you COMPLETELY sure that BitConverter.IsLittleEndian is returning false?

    If you inspect it through the debugger-watch before you have used any of it's methods you might get false even if it should return true.

    Read out the value through code to be completely certain. See also IsLittleEndian field reports false, but it must be Little-Endian?

提交回复
热议问题