C
coolqiang
Unregistered / Unconfirmed
GUEST, unregistred user!
TA = calss(TObject)
//...
constructor Create;
end;
TB = calss(TWinControl)
//...
constructor Create(AOwner: TComponent);override;
end;
如果将TB.Create方法的override声明去除,编译会提示它隐藏了基类的虚方法;
但TA.Create为何没有override声明呢?它的基类TObject也有Create方法啊?
这两种情况有何区别呢?
//...
constructor Create;
end;
TB = calss(TWinControl)
//...
constructor Create(AOwner: TComponent);override;
end;
如果将TB.Create方法的override声明去除,编译会提示它隐藏了基类的虚方法;
但TA.Create为何没有override声明呢?它的基类TObject也有Create方法啊?
这两种情况有何区别呢?