int t = 14;
byte[] ba = BitConverter.GetBytes(t);
int i = BitConverter.ToInt32(ba, 0);
--
William Stacey, MVP
http://mvp.support.microsoft.com
"Black_angel" <(E-Mail Removed)> wrote in message
news:8EA576BE-2832-4C60-811A-(E-Mail Removed)...
> Hello everybody,
>
> I want to cast an integer of 32 bits in a byte[] id.
> How can I break the Int32 id up to set it in the 4 first positions of the
> array of byte?
> and then, How can I get the full Int32 id of the array of bytes [] ?
>
> In MSDN appears a parse for Int to byte, but not for byte[], and if the
> integer of 32 bits has a very long number can take 4bytes up (32bits/8=
> 4bytes).
> Regards.
>
>
>