How can create multiple inheritence inc#, with example?

Showing Answers 1 - 8 of 8 Answers

ravi

  • Dec 17th, 2005
 

multiple inheritance is not possible in C#. although this is possible in C++ and creates more ambiguity...therefore it's avoided in C#.

  Was this answer useful?  Yes

phanikumar

  • Dec 22nd, 2005
 

We can achieve this by creatng interfaces, because interfaces supports multiple inheritance.

  Was this answer useful?  Yes

anil

  • Jan 17th, 2006
 

i think it is possible by using interfaces.can u give more clarification to me                                 

  Was this answer useful?  Yes

RxD

  • Jan 27th, 2006
 

A class can implement multiple interfaces.

public class A : Ix, Iy,Iz

This way you can achieve multiple inheritence

Regards,

RxD

  Was this answer useful?  Yes

Muruganandham C

  • Mar 24th, 2006
 

Sory you are wrong u can implement Multiple inheritance through Interface in c#

Muruganandham C

  Was this answer useful?  Yes

Sanjay Talreja

  • May 12th, 2006
 

C# doesn't support Multiple Inheritance.

Bcoz there are lot of problems with multiple inheritance.

so u can have multiple inheritance with the help of Intefaces.

Say there is a class manager who is derived from class person, but who also wants the functionality of class employee then he can have it using an interface.

But the methods inside the interface will not have any body.

  Was this answer useful?  Yes

harish

  • Aug 27th, 2006
 

good question

  Was this answer useful?  Yes

hai

  • Sep 28th, 2006
 

using interface

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions