The documentation of Bit开发者_如何学PythonConverter.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.
加载中,请稍侯......
精彩评论