Chapter 16. INHERITANCE PART I: BASIC CONCEPTS

You will learn about the following in this chapter:

  • The connection between taxonomical type hierarchies and object-oriented class hierarchies

  • Why inheritance is advantageous when implementing classes that naturally fit into a class hierarchy

  • The syntax needed for implementing a class hierarchy in C# and, in particular, how to derive a class from a base class

  • Virtual functions

  • The difference between overriding a method (using the override keyword) and re-implementing a new method (using the new keyword)

  • How access modifiers and class hierarchies interact

  • How to preserve the rules of encapsulation while implementing inheritance

  • The protected and internal protected access modifiers

  • Constructors and inheritance ...

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