Ricardo Amores
Ricardo Amores

Reputation: 4687

Best approach to write/read binary data in Little or Big Endian with C#?

Ok, if i've got a binary file encoded either in little endian or big endian under .NET, what is the best way to read / write to it?

In the .NET framework i've only managed to found BinaryWritters / BinaryReaders which use little endian as default, so my approach was implement my own BinaryReader / BinaryWritter for reading / writting data in big endian, but I wonder if there is a better aproach.

Upvotes: 3

Views: 2626

Answers (1)

Paul van Brenk
Paul van Brenk

Reputation: 7549

I like this one:

Miscellaneous Utility Library

Upvotes: 5

Related Questions