Share via


Overridable (Visual Basic)

Specifies that a property or procedure can be overridden by an identically named property or procedure in a derived class.

Comentários

Overridable is the default setting for a property or procedure that overrides a base class property or procedure.

You can shadow or override to redefine an inherited element, but there are significant differences between the two approaches. For more information, see Sombreamento em Visual Basic.

An element that can be overridden is sometimes referred to as a virtual element. If it can be overridden, but does not have to be, it is sometimes also called a concrete element.

Rules

  • Declaration Context. You can use Overridable only in a property or procedure declaration statement.

  • Combined Modifiers. Não é possível especificar Overridable em conjunto com MustOverride, NotOverridable, ou Shared na mesma declaração. Because an overriding element is implicitly overridable, you cannot combine Overridable with Overrides.

The Overridable modifier can be used in these contexts:

Instrução Function (Visual Basic)

Propriedade declaração

Instrução Sub (Visual Basic)

Consulte também

Referência

MustOverride (Visual Basic)

NotOverridable (Visual Basic)

Overrides (Visual Basic)

Conceitos

Sombreamento em Visual Basic

Outros recursos

Palavras-chave (Visual Basic)