编译器错误 CS0509

更新:2007 年 11 月

错误消息

“class1”: 无法从密封类型“class2”派生

sealed 类不能用作 base 类。默认情况下,结构被密封。

下面的示例生成 CS0509:

// CS0509.cs
// compile with: /target:library
sealed public class clx {}
public class cly : clx {}   // CS0509