Inheritance
Inheritance is a fundamental concept in object-oriented programming (OOP) that allows a child class to inherit properties and behaviors from another class (parent or base class). Inheritance enables code reuse, promotes a hierarchical organization of classes, and facilitates the creation of a more organized and maintainable code base.
Inheritance follows the is-a relationship, meaning a child class is a specialized version of the parent class. It can access all the parent class’s public and protected members (variables and methods) but not private ones. The child class can also override the methods of the parent class to provide its specific implementation while keeping the rest of the inherited behaviors intact.
In this chapter, we’re going to cover the following main topics:
- Inheritance in VB.NET
- Inheritance differences in family members
- Exception handling
- Is-a relationships