C# Structs usuing LayoutKind.Explicit error?

My guess would be, you have:
[FieldOffset(28)]
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public char[] TagType;

=> 28 + 16 = 44, but the following field starts at 45, so you've got one unaccounted for byte.

If you make the SizeConst=17 does it work?
 
Top
Sign up to the MyBroadband newsletter
X