Visual Basic Language Reference  

Shadows

The Shadows keyword indicates that a declared programming element shadows, or hides, an identically named element, or set of overloaded elements, in a base class. You can shadow any kind of declared element with any other kind.

A shadowed element is normally unavailable from within the derived class that shadows it. However, the following considerations apply:

The purpose of shadowing is to protect the definition of your class members. The base class might undergo a change that creates an element with the same name as one you have already defined. If this happens, the Shadows keyword forces references through your class to be resolved to your previously defined member, instead of to the new base class element.

The Shadows keyword is used in these contexts:

Class Statement

Const Statement

Declare Statement

Delegate Statement

Dim Statement

Enum Statement

Event Statement

Function Statement

Interface Statement

Property Statement

Structure Statement

Sub Statement

See Also

Private | Protected