Inheritance differences in family members
Inheritance in VB.NET and VB6/VBA share the same core concept of allowing classes to inherit properties and behaviors from other classes. However, there are significant differences in how inheritance is implemented and supported between the two versions of VB. Let’s look at these differences.
VB6/VBA
- Limited support: VB6 supports basic OOP, including inheritance. However, it lacks some essential features that are found in modern object-oriented languages.
- Class modules: In VB6, you create classes using class modules. Each class can have properties, methods, and events.
- Inheritance keyword: VB6 uses the
Inherits
keyword to establish an inheritance relationship between derived and base classes. However, VB6 does not support the inheritance of implementation details as it lacks the concept of access modifiers such aspublic
,protected
, orprivate
. - Interface-based inheritance: VB6 supports interface-based inheritance...