Multiple inheritance means having a common implementation from two base class derived in the child class which is not possible in C# However, we can use Interfaces to achieve multiple Inheritance.A class can implement more than one interface.
In general C# does not support the functionality to support multiple inheritance i.e a single class being derived from multiple classes. However interfaces are used to implement multiple inheritance. A class can implement multiple interfaces.
Multiple inheritance can be achieved through interface. You can have any no of interface implemented in your class. Classes which implements interface must provide implements for all the interface methods.
This group is an initiative from "Vidya Vrat Agarwal" a .NET Passionate. This group is created with a vision to encourage and help people learn Microsoft .NET technology. This group also provides a platform to share ideas, thoughts and experiences an individual may have while learning and implementing .NET technologies.
3 comments:
Multiple inheritance means having a common implementation from two base class derived in the child class which is not possible in C#
However, we can use Interfaces to achieve multiple Inheritance.A class can implement more than one interface.
In general C# does not support the functionality to support multiple inheritance i.e a single class being derived from multiple classes.
However interfaces are used to implement multiple inheritance. A class can implement multiple interfaces.
Multiple inheritance can be achieved through interface. You can have any no of interface implemented in your class.
Classes which implements interface must provide implements for all the interface methods.
Post a Comment