更新:2007 年 11 月
错误消息
“field”: 标记为 StructLayout(LayoutKind.Explicit) 的实例字段类型必须具有 FieldOffset 属性当结构标记为显式 StructLayout 属性时,结构中的所有字段必须具有 
下面的示例生成 CS0625:
// CS0625.cs
// compile with: /target:library
using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Explicit)]
struct A
{
   public int i;   // CS0625 not static; an instance field
}
// OK
[StructLayout(LayoutKind.Explicit)]
struct B
{
   [FieldOffset(5)]
   public int i;
} | |