I was directed on how to read a hex file into an array and it worked out very well. I got the array loaded up from a file that contained hex bytes between 00 and ff. However, when I when to look at the decimal values in the array by use of the "value.Text = myarray[myByte].ToString();", everything worked fine if the value of the byte was 127 or less. Any value above 127 returned a value of 65533. The type of "value" is uint. What is happening?
NOVICE3
NOVICE3 0 Newbie Poster
Recommended Answers
Jump to PostHmmm...that's odd.
I would say that the values are probably being loaded incorrectly OR they are loaded correctly and it's reporting correctly, just the text file is setup wrong.
The hex value of 128 is 80, I wonder if the hex text file uses FF00 or something goofy.
…
Jump to Postif (responsibleDialogResult != DialogResult.Cancel)
Is it so hard to say if (responsibleDialogResult == DialogResult.OK) ?
What is tempArray ?
All 6 Replies
zachattack05 70 Posting Pro in Training
Momerath 1,327 Nearly a Senior Poster Featured Poster
zachattack05 70 Posting Pro in Training
NOVICE3 0 Newbie Poster
ddanbe 2,724 Professional Procrastinator Featured Poster
Momerath commented: I hate when people do that +2
zachattack05 70 Posting Pro in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.