Hello,
(E-Mail Removed)!
jp> I need to be able to read a binary file that contains fields written in
jp> BOTH big endian and little endian byte orders. I am currently unable to
jp> read the big endian fields (erroneous values because of the different
jp> byte orders).
jp> I am currently using FileStream and BinaryReader objects to open and
jp> read the file. As I mentioned above calls to ReadInt32() return
jp> erroneous values becuase of the byte order on the big endian fields.
jp> Is there some sort of "magic" converter, like...
jp> BigEndianToLittleEndian(r.ReadInt32());
Yep, there is :8-)
Look at
IPAddress.HostToNetworkOrder and vice versa IPAddress.NetworkToHostOrder
--
Regards, Vadym Stetsyak
www:
http://vadmyst.blogspot.com