how many types of inheritance posible in c# using .net.
how many types of inheritance posible in c# using .net.
5 inhertinace
1. single
2. Mulitple
3. Multilevel
4. hybride
5. hierarical
C# support two types of inheritance.
1.Implementation Inheritance
2.Interface Inheritance.
Implementation Inheritance:
If a class is derived frm another class such that it inherits all the members of base class then it is implementation inheritance.
Interface Inheritance:
when a class inherits only signatures of functions frm another calss then it's known as interface inheritance......
There are two types of inheritance used in modern programming languages. C# and other .NET languages use single inheritance. This means that a subclass may only inherit functionality from a single base class.
Multiple inheritance permits a subclass to have two or more superclasses. In this situation the derived class inherits functionality from several base classes. Multiple inheritance is not supported by C# or the .NET framework. However, this does not stop a class from providing many public interfaces as will be seen in a later article.
PLease let me know if i am wrong or missing something
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.