When marshalling using UnmanagedType.ByValArray, the SizeConst field should be specified.
struct MyStruct
{
[MarshalAs(UnmanagedType.ByValArray)]
int[] Foo;
}
Category: Interoperability
Default: Enabled
cc @terrajobst @stephentoub @AaronRobinsonMSFT @jkoritzinsky
When marshalling using
UnmanagedType.ByValArray, theSizeConstfield should be specified.Category: Interoperability
Default: Enabled
cc @terrajobst @stephentoub @AaronRobinsonMSFT @jkoritzinsky