[StructLayout(LayoutKind.Explicit)]
struct MyStruct {
[FieldOffset(0)]
public byte F1;
[FieldOffset(1)]
public byte F2;
[FieldOffset(2)]
public byte F3;
[FieldOffset(3)]
public byte F4;
}
MyStruct s;
s.F1 = 0x00;
s.F2 = 0xF1;
s.F3 = 0x00;
s.F4 = 0x01;
uint p = 0x00F10001;
How can I convert MyStruct s to uint p ?
Thanks in advance.