Possible Duplicate:
How to check the number of bytes consumed by my Structure?
I have a struct in the packed form of
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct test
{
public int a;
public uint16 b;
}
How do I get the size of the struct as the compiler states that sizeof can only be used in unsafe context?