Why does LayoutKind.Sequential work differently if a struct contains a DateTime field?
Consider the following code (a console app which must be compiled with \"unsaf
To answer my own questions (as advised):
Question: "Does this behaviour have any ramifications when doing interop with C/C++ structs that use the Com DATETIME type?"
Answer: No, because the layout is respected when using Marshalling. (I verified this empirically.)
Question "Can anyone provide an explanation?".
Answer: I'm still not sure about this, but since the internal representation of a struct is not defined, the compiler can do what it likes.