Sorry for the poor wording, but I could not find a better way to explain this.
From my point of view, C # is the WORA language - you can write it on one computer and deploy it on another, since MSIL will not compile until the application is launched.
So why exactly is BitConverter.IsLittleEndian defined like this :
#if BIGENDIAN public static readonly bool IsLittleEndian ; #else public static readonly bool IsLittleEndian = true; #endif
BIGENDIAN Here is the preprocessor directive, which means that it was resolved at compile time. So if the development machine is slightly end-oriented and the target uses a large endian, will IsLittleEndian still report true on the target machine?
source share