|
-
Jul 1st, 2004, 11:55 AM
#1
Thread Starter
New Member
Converting Little Endian to Big Endian
Hello
I'm reading in a series of 4 byte single precision numbers using the BinaryReader. The problem is that these numbers are really big endian but are being read in as little endian. Is there a convenient way around this problem?
-
Jul 7th, 2004, 08:08 AM
#2
Thread Starter
New Member
I have solved the problem. What I have done is read in four bytes into an array using ReadByte from BinaryReader, writes those four bytes in reverse order to a second file using Write from BinaryWriter, and read in the desired value from the second file using ReadSingle from BinaryReader. It seems so simple now. Thank you all who have read my thread.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|