NotOverridable

Specifies that a property or procedure cannot be overridden in a derived class.

Remarks

NotOverridable is the default setting for a property or procedure that does not itself override a base class property or procedure.

An element that cannot be overridden is sometimes called a sealed element.

Rules

  • Declaration Context. You can use NotOverridable only in a property or procedure declaration statement. You can specify NotOverridable only on a property or procedure that overrides another property or procedure, that is, only in combination with Overrides.

  • Combined Modifiers. You cannot specify NotOverridable together with MustOverride, Overridable, or Shared in the same declaration.

The NotOverridable modifier can be used in these contexts:

Function Statement (Visual Basic)

Property Statement

Sub Statement (Visual Basic)

See Also

Concepts

Shadowing in Visual Basic

Reference

MustOverride

Overridable

Overrides

Visual Basic Language Keywords