A class inherits the members of its parent class. Inheritance means that a class implicitly contains all members of its parent class, except for constructors. Some important aspects of inheritance are listed below:
Inheritance is transitive. If a class C is derived from B, and B is derived from A, then C inherits the members declared in B as well as the members declared in A.
A derived class extends its parent class. A derived class can add new members to those it inherits, but it cannot remove the declaration of an inherited member.
Constructors are not inherited, but all other members are, regardless of their declared visibility scope. However, depending on their declared visibility scope, inherited members might not be accessible in a derived class.
A derived class can hide inherited members by declaring new members with the same name or signature.
An instance (object) of a class contains a set of fields declared in the class and its base classes, and an implicit conversion exists from a derived class type to any of its base class types. Thus, a reference to an object of some derived class can be treated as a reference to an object of any of its base classes.
A class can declare virtual methods and properties, and derived classes can override the implementation of these function members.
See also: