adspace


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 to assign Null value to Var?

1064


How do you inherit a class into other class in c#?

995


What is an abstract class c#?

969


Which namespaces are necessary to create a localized application?

1142


Why can't we use a static class instead of singleton?

954


What is expression tree in c#?

998