Derived classes

This image from the Codefinty class C# Beyond Basics is a great visual on derived classes, also known as parent/child classes.

derived class (also called a child class) is a class which inherits the properties of some other class while on the contrary, a base class (also called a parent class) is a class which is inherited from.

When we say a class is derived from another class, it means that it has all the fields and methods of the parent class and in addition to it, the derived class can contain additional fields and methods as well.

Below shows an example of a method on the parent class being accessible by the derived/child class.

Leave a Reply

Your email address will not be published. Required fields are marked *