一个关于inherited的问题

crackatom 2003-08-07 03:33:13
inherited后面跟identifier和不跟有什么区别?
我看了半天的HELP硬是没有看懂~

比如说:

inherited Create(...);

inherited;

...全文
51 2 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
crackatom 2003-08-07
  • 打赏
  • 举报
回复
比如说:

procedure Tinfo.SetView(CView: TWinControl);
begin
inherited SetView(CView);
end;

SetView(CView)可以换成其他的基类方法,比如说GetView(CView)什么的?
李_军 2003-08-07
  • 打赏
  • 举报
回复
inherited Create(...);就是调用基类的Create方法,而inherited 是调用基类同名的那个方法,有的是一定要指定名字的

5,927

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧