更新:2007 年 11 月
错误消息
字段不能有 void 类型字段被声明成了
下面的示例生成 CS0670:
// CS0670.cs
class C
{
void f; // CS0670
// try the following line instead
// public int f;
public static void Main()
{
C myc = new C();
myc.f = 0;
}
} | |