Summary

In the first part of this chapter, I discussed inheritance. Issues associated with inheritance include base classes, abstract base classes, accessing base class members, hiding base class members, versioning, and sealed classes.

The next part covered encapsulation. Relevant encapsulation topics included data hiding, modifiers supporting encapsulation, encapsulation strategies using indexers and properties, and the relationship of encapsulation to inheritance.

Finally, the subject of polymorphism was explained. This section included strategies on how to implement polymorphism, the use of hiding in a polymorphic context, determining the most derived implementation of a virtual method, polymorphism with properties, and polymorphism with ...

Get C# Unleashed 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.