Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the difference between boxing and unboxing?

950


Can any object be stored in a viewstate in .net?

1061


Explain about the Common Language Runtime?

1107


Define code access security (cas)?

998


What is the purpose of enumerable class in .net?

1085


What is .net assembly?

1042


Is .net core stable?

905


Explain me difference between public and static modifiers?

1079


How can I tell if .net 3.5 is installed?

939


Tell us what do the following acronyms in .net stand for: il, cil, msil, cli and jit?

928


Describe difference between inline and code-behind?

1105


What exactly is being serialized when you perform serialization in .net?

1021


What’s different between process and application in .net?

1057


How can I get at the win32 api from a .net program?

995


Please explain what is the difference between a class and an object?

1034