Reversing byte order in .NET

后端 未结 7 1128
天命终不由人
天命终不由人 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条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-03 12:16

    You're on a little endian machine, where integers are stored least-significant byte first.

提交回复
热议问题