How do I convert Byte array to long or string?

  • Thread starter Thread starter Jim H
  • Start date Start date
J

Jim H

I am getting binary data form a database binary(8). I am copying it to a
byte array byte[8]. I need to covert this to a number, ulong, so I can
write it to a string in hex format.

Any idea on how I do this? I don't see any conversion methods.

jim
 
I am getting binary data form a database binary(8). I am copying it to a
byte array byte[8]. I need to covert this to a number, ulong, so I can
write it to a string in hex format.

BitConverter.ToUInt64()



Mattias
 
Thanks! I didn't know about the BitConverter class.

Mattias Sjögren said:
I am getting binary data form a database binary(8). I am copying it to a
byte array byte[8]. I need to covert this to a number, ulong, so I can
write it to a string in hex format.

BitConverter.ToUInt64()



Mattias
 
Back
Top