Re: From ushot to byte[]
- From: "Siva M" <shiva_sm@xxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Sep 2005 17:54:53 +0530
Hi,
Check out BitConverter.GetBytes(). This just gets the bytes as an array.
"Salvatore Di Fazio" <salvatore.difazio@xxxxxxxxx> wrote in message
news:1126095263.477498.289000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi guys,
I've a ushort variable and I need to copy it in an array of byte.
I wrote:
m_bMsg[0] = (byte) (p_sTrackNumber & 0xff00 >> 8);
m_bMsg[1] = (byte) (p_sTrackNumber & 0x00ff >> 16);
but I would like to know if exist a better way by a C# class.
Tnx
.
- References:
- From ushot to byte[]
- From: Salvatore Di Fazio
- From ushot to byte[]
- Prev by Date: Re: long word in string
- Next by Date: Re: NUnit Documentor
- Previous by thread: From ushot to byte[]
- Next by thread: Re: From ushot to byte[]
- Index(es):