Copying memory into byte array

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I want to copy an 32-bit integer into an array of type byte, so that 4 indices in the array contain the integer value
Dim test As Byte(
Dim i As Int3
How can I copy the second one into the first one in VB.NET(actually a memcpy equivalent)

Thanks a lo
Sam
 
Sam Johnson said:
I want to copy an 32-bit integer into an array of type byte, so that
4 indices in the array contain the integer value.
Dim test As Byte()
Dim i As Int32
How can I copy the second one into the first one in VB.NET(actually a
memcpy equivalent)?

Have a look at BitConverter.GetBytes(Int32).
 
Back
Top