is c#.net supports multiple inheritance?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is .net used?

547


Is the COM architecture same as .Net architecture? What is the difference between them (if at all there is)?

1561


Explain me what is the difference between an abstract class and an interface?

555


What is heap and what is stack?

569


What are the differences between an interface and an abstract class in .net?

506






i had attended to infosys interview on 17th april 2010...on .net..3+ experience for Technology Analyst .. to my knowledge i did well in technical and hr whether i loose the interview or still processing is taking place..am confused please. what accuatly would be happend?

1926


Explain can the validation be done in the server side? Or this can be done only in the client side?

498


What is Ajax design pattern in .NET?

642


What is equivalent for regsvr32 exe in .net ?

668


Explain assemblies in .net?

604


What is Ajax? How it is related to your project?

612


What is a metadata in .net?

564


What are the advantages of .net core?

524


With these events, why wouldn't microsoft combine invalidate and paint, so that you wouldn't have to tell it to repaint, and then to force it to repaint?

501


What is the intermediate language between asp and asp.net1.0?

1455