为什么我不能在继承中使用BASE

Boh*_*ohn 0 c# windows inheritance

正是这段代码:编译错误说使用base在这种情况下无效.

public class UCMComboBoxCellType : FarPoint.Win.Spread.CellType.ComboBoxCellType
{
    public UCMComboBoxCellType()
    {
        base();
        this.ListWidth = 0;
    }
}
Run Code Online (Sandbox Code Playgroud)

但为什么?我弄不清楚.

Pau*_*ips 8

在C#中你链式构造函数如下:

public UCMComboBoxCellType() : base()
{        
    this.ListWidth = 0;
}
Run Code Online (Sandbox Code Playgroud)

你尝试的是Java方式.