在C#中,我可以通過base
關鍵字訪問基類,在java中,我可以通過super
關鍵字訪問它。如何在delphi中做到這一點? 假設我有以下代碼:如何在Delphi中訪問base(super)類?
type
TForm3 = class(TForm)
private
procedure _setCaption(Value:String);
public
property Caption:string write _setCaption; //adding override here gives error
end;
implementation
procedure TForm3._setCaption(Value: String);
begin
Self.Caption := Value; //it gives stack overflow
end;