Casting data types into byte arrays

Is there a way to cast int32 or any other data type into a byte array
When building Network messages it would be very useful to be able to cast data types into Network endia byte arrays to build my messages. Many times I need to place a 16,32, or 64-bit integer into a network packet.
 I would also be interested if there was a way to change the endia of the data perhapes with a "reverse Array.copy" commad

 (Unless there is a better way to create data packets in VB other than byte arrays)

Any takers
JD




Answer this question

Casting data types into byte arrays