Shadows Keyword

   
Shadows Keyword

Syntax

 Shadows 

Description

When a member of a derived class has the same name as a member of the same type in the base class, and the keywords Overridable and Overrides are used appropriately, then the derived class member overrides the base class member. That is, any reference to the member using a derived class object refers to the implementation in the derived class.

Shadowing works in a similar way but allows any member type to "override" any other member type. Thus, for example, a method can "override" a property. For a complete discussion of shadowing (with an example), see Section 4.4.5 in Chapter 4.

VB.NET/VB 6 Differences

The Shadows keyword is new to VB.NET.

   


VB.Net Language in a Nutshell
VB.NET Language in a Nutshell
ISBN: B00006L54Q
EAN: N/A
Year: 2002
Pages: 503

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net