More about Inheritance
Our case study has illustrated many important features of object-oriented programming, but there is more to the story. Methods in a derived class may hide the corresponding method in the base class, possibly making use of the base class method in their implementation. Alternatively, the base class may have virtual methods, which are not bound to an object at compile time but are bound dynamically at runtime. A derived class may override a virtual method. This dynamic binding behavior enables polymorphic code, which is general code that applies to classes in a hierarchy, and the specific class that determines the behavior is determined at runtime.
VB.NET provides keywords Overridable and Overrides that precisely specify ...
Get Application Development Using Visual Basic® and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.