Application Development Using Visual Basic® and .NET
by Robert J. Oberg, Peter Thorsteinson, Dana L. Wyatt
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access