Shadowing of Class Procedures
Visual Basic also provides another way of replacing procedures in a base class with others of the same name in a derived class. This is called member shadowing.
After defining a function in a base class, a function of the same name in a derived class can completely shadow the original, as shown in the following example:
Open the corresponding solution (.sln), which you can find in the \VB 2010 Developer Handbook\Chapter 10\Shadowing01 folder.
Module mdlMain Sub Main() Dim locBaseInstance As New BaseClass Console.WriteLine(locBaseInstance.AFunction().ToString()) locBaseInstance = New DerivedClass Console.WriteLine(locBaseInstance.AFunction().ToString()) Console.WriteLine() Console.WriteLine("Press key ...