How to convert an unmanaged structure pointer to byte[] in c
Please help me to convert an unmanaged structure pointer to byte[] in c#?
public struct struct1
{
public byte a;
public int b;
}
struct1 objstruct= new struct1();
struct1* ptrStruct=&objstruct;
ptrStruct->a=1;
ptrStruct->b=4;
how can i convert ptrStruct to byte[]?