How do you implement multiple inheritance in .NET?

Answer Posted / shadab

To implement multiple inheritance in .net we will have to
use Interface...

see the below program..

using System;
interface Ifirst
{
void display();
}
class use:Ifirst
{
public void display()
{
Console.WriteLine("This is a method");
}
public static void Main()
{
use u=new use();
u.display();
}

}

----------
for more help visit my blog
http://www.shadab-programminghelp.blogspot.com

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I create a single-file assembly?

684


What is threading in c# with example?

646


Describe an interface class?

751


What is the difference between dataset and datatable in c#?

717


What you mean by delegate in c#?

660


Can you specify nested classes as partial classes?

705


What is the usage of OLE?

758


What is the difference between var and dynamic types in c# 4.0?

689


Why do we use static class in c#?

649


Explain code compilation in c#.

702


Explain About Postback

721


Which is better interface or abstract class in c#?

589


What is a copy constructor in c#?

696


What is a string in c#?

648


Where do we use serialization in c#?

659