共用方式為


編譯器錯誤 CS0509

更新:2007 年 11 月

錯誤訊息

'class1': 無法衍生自密封型別 'class2'

sealed 類別不能做為基底類別。根據預設,結構 (Struct) 為 sealed。

下列範例會產生 CS0509:

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