Why multiple inheritance is not possible in c#

Answer Posted / gp_bellamkonda

When we use the Multiple inherutance,we use more than one
class.Suppose class A and class B are base classes and
class c is is multiple inherting it.it may be possible that
this function with same name and same signature can present
in both class A and Class B .At this time how the compiler
will know which function it should take wherether from
class A or class B.
So Multiple inheritance won't work.
To avoid this problem we use Interface..... it means in
interface we just declare a function and in the derived
class we give the definition as per the requirement...means
function should be abstract ... and in interface all funcion
[method] should abstract

Is This Answer Correct ?    36 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When do you generally use a class over a struct?

720


What is the use of parse in c#?

634


What are desktop applications examples?

704


What is difference between web and window application?

592


Explain what is copy constructor?

778


Constructor to an arbitrary base constructor?

742


Can enum have methods c#?

654


Is it possible to inline assembly or il in c# code?

742


What is concatenation and when should it be used?

692


Explain how many types of exception handlers are there in .net?

688


What are tuples c#?

681


From which base class do all Web Forms inherit from?

711


What is the difference between arraylist and list in c#?

637


Is c# static or dynamic?

704


How do you access a constant field declared in a class?

670