Convert to hex and write to file

  • Thread starter Thread starter AMP
  • Start date Start date
A

AMP

Hello,
I have an Array of bytes that I want to fromat as Hex and print to a
file.
EX: bytenumbers[] = {1,3,5,34,65,78,234}
I want to format them as their hex values and tr.Write them as F0 12
A0...........
Any help would be appreciated
Thanks
Mike
 
Mike,

You want to take a look at the overload of ToString which takes a string
parameter. Pass "X" for the parameter and you should get the string
representation in hex format.

Then, you can cycle through the bytes and write them to the file.

Hope this helps.
 
Back
Top