W
William Stacey
Pin the int32 variable, then use Marshal.Copy to copy the contents of the
If the array is pinned, you could also cast the first byte to an int pointer
and assign it to a managed int or use it. As you said, you need to be aware
of the endianess. I have also cast structs to byte arrays this way for easy
access to the elements.
byte array to the int32 address.
If the array is pinned, you could also cast the first byte to an int pointer
and assign it to a managed int or use it. As you said, you need to be aware
of the endianess. I have also cast structs to byte arrays this way for easy
access to the elements.