Error del compilador C3271
'member': valor no válido 'value' para el atributo FieldOffset
Se pasó un número negativo al atributo FieldOffset .
El ejemplo siguiente genera la advertencia C3271:
// C3271.cpp
// compile with: /clr /c
using namespace System;
using namespace System::Runtime::InteropServices;
[StructLayout(LayoutKind::Explicit)]
value class MyStruct1 {
public: [FieldOffset(0)] int a;
public: [FieldOffset(-1)] long b; // C3271
};