如题,请详细点,Delphi的帮助看不懂,不好意思。

解决方案 »

  1.   

    很简单,就是继承。
    例如:一个方法有行为(一般是父类的),在你继承这个方法然后重写的时候,如果有inherited,那么,父类中这个行为执行,如果没有inherited,那么,这里只执行你写的程序,父类中的行为将被屏蔽掉。
      

  2.   

    说的很清楚了,一般你如果注意看vcl源码的话,应该有看到inherited的身影的。The reserved word inherited plays a special role in implementing polymorphic behavior. It can occur in method definitions, with or without an identifier after it.
    If inherited is followed by a method identifier, it represents a normal method call, except that the search for the method begins with the immediate ancestor of the enclosing method抯 class. For example, wheninherited Create(...);occurs in the definition of a method, it calls the inherited Create.
    When inherited has no identifier after it, it refers to the inherited method with the same name as the enclosing method. In this case, inherited can appear with or without parameters; if no parameters are specified, it passes to the inherited method the same parameters with which the enclosing method was called. For example,inherited;occurs frequently in the implementation of constructors. It calls the inherited constructor with the same parameters that were passed to the descendant.
      

  3.   

    类似java里的super,也就是说当你重载一个父类方法而又要在其中调用父类方法时,使用inherited.