shine pb

shine pb

  • NA
  • 40
  • 13.2k

How to convert an unmanaged structure pointer to byte[] in c

Sep 26 2013 10:00 PM
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[]?

Answers (1)