In C# i can access base class by base keyword, and in java i can access it by super keyword. How to do that in delphi?
suppose I have following code:
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;
You are getting a stackoveflow exception because the line
is recursive.
You can access the parent property
Captioncasting theSelfproperty to the base class like so :or using the
inheritedkeyword