Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which .Net-compatible architectures are not little-endian?

Tags:

.net

The BitConverter class has a field IsLittleEndian which, according to the documentation:

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

I notice in Reflector that the field is hard-coded to true in the static constructor of BitConverter.

So my question is, do I need to take account of IsLittleEndian when using the BitConverter - in other words, are there any .Net implementations running on big-endian platforms? And if not, what was the purpose of the field in the first place?

like image 560
Samuel Jack Avatar asked Oct 30 '25 05:10

Samuel Jack


2 Answers

The .Net Micro Framework 4.1 supports big-endian - Source

like image 96
Matthieu Avatar answered Oct 31 '25 22:10

Matthieu


SOME of the systems that the .NET Micro Framework runs on are (or can be...) big-endian. Version 4.1 introduced support for big-endian architectures.

You'd probably know if you were running on the micro framework, however...

like image 22
Mark Avatar answered Oct 31 '25 23:10

Mark