Implications of Inheritance

You have seen what inheritance is. Now you will look at the implications of inheritance in some key areas you have learned so far, namely visibility of members, constructors, overloading of methods, and shared members.

Visibility

You have seen that members of a class can have one of the three standard access modifiers (Public, Private, and Friend). We also mentioned that you can have members declared as Protected. You will now learn what protected members are and how to use them.

First we need to mention that the public, private, and friend modifiers are exactly the same in the case of both base and derived classes. A Public member is accessible to anyone in the assembly and outside it. A Private member is accessible ...

Get Visual Basic® .NET by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.