G
Guest
In C++ I use the memcpy function to copy a struct to a buffer, I have not
been able to find a method to do this in C#.
I will need to be able to do this for a struct with mixed types.
Example as follows:
public struct MyStruct
{
public int iOne;
public int iTwo;
public int iThree;
public string sOne;
};
I would want to copy the above data in the struct to a buffer of bytes.
Example:
byte[] bytes = new byte[1024];
Any ideas?
Thank you
G
been able to find a method to do this in C#.
I will need to be able to do this for a struct with mixed types.
Example as follows:
public struct MyStruct
{
public int iOne;
public int iTwo;
public int iThree;
public string sOne;
};
I would want to copy the above data in the struct to a buffer of bytes.
Example:
byte[] bytes = new byte[1024];
Any ideas?
Thank you
G