Override Methods

When an instance method declaration includes the Override modifier, it means that this method redefines implementation of an inherited virtual method of the base class.

A method overridden by an override method declaration is known as base implementation of this method. For an override method M declared in a class C, the base implementation is determined by examining each base class of C, starting with the parent class and continuing in the order of inheritance hierarchy, until an accessible method with the same signature as M is located.

The following conditions are to be satisfied to successfully compile an override method:

Example

An example of overriding methods is given in the description of virtual methods.

See also:

Methods