Sunday, April 18, 2010

How do you achieve multiple inheritance in .NET?

3 comments:

Jasmine said...

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.

Ekta said...

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.

Isha said...

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.