Using inheritance in C#

In today's world, inheritance is usually associated with the end of things. In OOP, however, it is associated with the beginning of something new and better. When we create a new class, we can take an already existing class and inherit it on our new class. This means that our new object will have all the features of the inherited class as well as the additional features added to the new class. This is at the root of inheritance. We call a class that inherits from another a derived class.

Get C# 7 and .NET Core Cookbook 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.