Chapter 12. Working with Inheritance
After completing this chapter, you will be able to
Create a derived class that inherits features from a base class.
Control method hiding and overriding by using the new, virtual, and override keywords.
Limit accessibility within an inheritance hierarchy by using the protected keyword.
Define extension methods as an alternative mechanism to using inheritance.
Inheritance is a key concept in the world of object orientation. You can use inheritance as a tool to avoid repetition when defining different classes that have a number of features in common and are quite clearly related to each other. Perhaps they are different classes of the same type, each with its own distinguishing feature—for example, managers, manual ...