July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Another way of accessing the base classes’ members is the MyClass keyword. Imagine you have a base class exposing some overridable members, such as properties or methods; then you have a derived class that overrides those members. The MyClass keyword avoids the application of overriding and invokes members on the derived class as if they were NotOverridable on the base class. In other words, MyClass enables executing members of a base class in the context of a derived class, ensuring that the member version is the one in the base class. Listing 12.1 shows an example.
LISTING 12.1 Demonstrating the MyClass Keyword
Public Class BaseClassDemo Public Overridable ReadOnly Property Test As String Get ...