编译器错误 CS0522
更新:2007 年 11 月
错误消息
“constructor”:结构无法调用基类构造函数
struct 不能调用基类构造函数;请移除对基类构造函数的调用。
下面的示例生成 CS0522:
// CS0522.cs
public class clx
{
public clx(int i)
{
}
public static void Main()
{
}
}
public struct cly
{
public cly(int i):base(0) // CS0522
// try the following line instead
// public cly(int i)
{
}
}