Delphi中inherited问题

inherited Create(AOwner); 和直接写inherited有区别吗 

有区别,inherited Create是指定调用父类的Create方法,当然你也可以inherited Destory等等,
如果直接写inherited则默认以本方法名在父类中调用
 
inherited就是调用祖先类的函数,如果不带参数就是默认调用同名函数
如果

带参数则表明子类中的函数个数可能比祖先类要多取其中的几个参数传过去
例如
祖先类有个函数 Create(AName:string);
子类有个函数 Create(AName:string;AComponent:TObject);override;
那么子类的Create函数内就可以这样调用祖先类:
procedure TAClass.Create(AName:string;AComponent:TObject);
begin
    Inherited Create(AName);
end;
好的代码像粥一样,都是用时间熬出来的
原文地址:https://www.cnblogs.com/jijm123/p/14053294.html