By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,495 Members | 1,220 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,495 IT Pros & Developers. It's quick & easy.

How do I convert Byte array to long or string?

P: n/a
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
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
>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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2

P: n/a
Thanks! I didn't know about the BitConverter class.

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:eA**************@tk2msftngp13.phx.gbl...
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.