문제

The documentation of BitConverter.IsLittleEndian says:

Indicates the byte order ("endianness") in which data is stored in this computer architecture.

"this" is confusing me. Say I have the following code:

Console.WriteLine(BitConverter.IsLittleEndian);

Now say I go to compile my program on my little endian machine. If I copy paste the executable onto a big endian machine, will it say false? or true? Basically I want to know if the field is a dynamic one, and if the JIT has anything to do with it.

도움이 되었습니까?

해결책

BitConverter.IsLittleEndian indicates the architecture of the machine your binary is running on, not the one you're compiling on. It's checked entirely at runtime.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top