Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

NotInheritable

Specifies whether this method can be inherited in subclasses.

Usage

To specify that this method cannot be inherited in subclasses, use the following syntax:

Method name(formal_spec) As returnclass [ NotInheritable ]
{
   //implementation
}

Otherwise, omit this keyword or place the word Not immediately before the keyword.

Details

This keyword specifies that this method cannot be inherited in subclasses.

Important:

While having a member not be inheritable by its subclasses can be very useful in some cases, the keyword should be used rarely and judiciously, as it breaks the inheritance contract.

Default

If you omit this keyword, this method is inheritable.

See Also