is c#.net supports multiple inheritance?

Answers were Sorted based on User's Feedback



is c#.net supports multiple inheritance?..

Answer / srinivas

Yes Supports multiple inheritance,
by using interface

Is This Answer Correct ?    40 Yes 5 No

is c#.net supports multiple inheritance?..

Answer / pavan

c# doesnot provide multiple inheritance as it can lead to
abiguity for compiler
but we can use multiple inheritance in c# in interface
concept

Is This Answer Correct ?    26 Yes 1 No

is c#.net supports multiple inheritance?..

Answer / jagan

hai friends,
we can achieve this multiple inheritence through
interfaces..
ex:interface I1
{
void add();

}
interface I2
{
void add();
}

class sample:I1,I2
{
I1.add()
{
console.write("this is add method");
}
I2.add()
{
console.write("this is del method");
}
}

//main()
{
I1 i1=new sample();
i1.add();
I2 i2=new sample();
i2.add();
}
}

here we can achieve multiple inheritence and we can avoid
the naming conficts..hope it will be usefull ........

Is This Answer Correct ?    24 Yes 1 No

is c#.net supports multiple inheritance?..

Answer / laxmi

No.C# sharp does not support multiple inheritance .
Single inheritance is only possible in c#

Is This Answer Correct ?    26 Yes 9 No

is c#.net supports multiple inheritance?..

Answer / ajay

no it does not support multiple inheritance

Is This Answer Correct ?    15 Yes 2 No

is c#.net supports multiple inheritance?..

Answer / aravind reddy

HI GUYS,

C#.NET SUPPORTS ONLY SINGLE LEVEL OF INHERITENCE AND
MULTILEVEL OF INHERITENCE IS SUPORTED THROUGH INTERFACES

REG
ARAVIND REDDY

Is This Answer Correct ?    18 Yes 9 No

is c#.net supports multiple inheritance?..

Answer / kinjal

hiii friends,

c# not support multiple inheritance its only support single level inheritance and in multiple inheritance support through interface

Is This Answer Correct ?    9 Yes 0 No

is c#.net supports multiple inheritance?..

Answer / dipal mehta

The above one is a right answer but the reader who reads it
for referance plz Note line :

I1 i1=new sample();
i1.add();

This might confusing but It means that We have created
object of I1 interface class but with sample as a assigned
object which is valic in this case.
Now call of i1.add() will call the method of interface I1
which points to or defined in Sample class
This will more clearer if you will append two or three more
simple methods like subtract() and try to call it as above
one which actually a part of Mostly used Multiple
Inheritance funda.
personally speaking it will benefitial to you if try
yourself
Hope readers like tips

Is This Answer Correct ?    8 Yes 2 No

is c#.net supports multiple inheritance?..

Answer / sujit

not directly, but with the help of interface we can achieve
multiple inheritance.

Is This Answer Correct ?    4 Yes 0 No

is c#.net supports multiple inheritance?..

Answer / krishna chaitanya

Through Interfaces multiple inherirance is possible.But
single inheritance is possible with inheritance only.

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More Dot Net General Interview Questions

What is LINQ?

2 Answers   Ethos, MSP, TCS,


Explain me what is a design pattern and what is it for?

0 Answers  


What is gac in .net?

0 Answers  


can any one tel me hw to connect database connectivity of dot NET and back end as MS access?

1 Answers  


Explain how to manage pagination in a page using .net?

0 Answers  






What are nullable types in .NET

0 Answers   TryTechnicals Pvt Ltd,


What is static constructor, when it will be fired?

0 Answers  


What's a windows process in .net?

0 Answers  


A developer company sends dlls to the client. Some client is not happy current functionality, so request some modification. Developer made some changes and send new dll to all clients. Some client is happy with old version, tell me minimal change to so that neither clients get affected?

0 Answers  


Can "this" be used within a static method?

0 Answers  


What is difference between .net core and .net standard?

0 Answers  


State some of the different languages supported by .net?

0 Answers  


Categories