Original Post
Hi, I wonder how can I read a memory chunk and convert it in a byte array in c#. To be more specific, suppose I have a class like this: class Numbers { public int x, y, z; public float a, b, c; } How can I convert it in an array of bytes in which I'll know that the first 12 bytes will be the integers and the next 12 will be the floats? After that what must I do to reconvert it to the class object it was before? In c++ using pointers made it easy but here in c# seems a little more difficult. Any hint would be helpful. Thanks