Re: bytes To Hex
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Tue, 05 Feb 2008 10:24:31 -0800
On Tue, 05 Feb 2008 10:04:28 -0800, Analizer1 <dvs_bis@xxxxxxxxxxxxx> wrote:
Hi I have a Long Number
In a Byte[]
Im not sure how to convert this Byte[] array to a Hex
string
Well, the .NET way would be to use BitConverter to get the bytes into an actual long value, and then use ToString("x") to convert to hex:
byte[] rgb = { 1, 2, 3, 4, 5, 6, 7, 8 };
string strHex = BitConverter.ToInt64(rgb, 0).ToString("x");
Pete
.
- Follow-Ups:
- Re: bytes To Hex
- From: Analizer1
- Re: bytes To Hex
- From: Bjørn Brox
- Re: bytes To Hex
- From: Analizer1
- Re: bytes To Hex
- References:
- bytes To Hex
- From: Analizer1
- bytes To Hex
- Prev by Date: Re: Does reading SelectedIndex on a combo box require an invoke?
- Next by Date: Re: bytes To Hex
- Previous by thread: bytes To Hex
- Next by thread: Re: bytes To Hex
- Index(es):
Relevant Pages
|