C# supports two types of Inheritance mechanisms
1) Implementation Inheritance
2) Interface Inheritance
Implementation Inheritance:
When a class (type) is derived from another class(type) such that it inherits all the members of the base type it is Implementation Inheritance
Interface Inheritance:
When a type (class or a struct) inherits only the signatures of the functions from another type it is Interface Inheritance
C# does not support multiple implementation inheritance A class cannot be derived from more than one class However, a class can be derived from multiple interfaces
No comments:
Post a Comment