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 managed code execution?

1051


What is .net and why it is used?

921


What is alias ? Is it used in .Net ?

1062


Explain the difference between constants and read-only variables?

982


What is the difference between constants and read-only variables?

1006


Which namespace is used to support multithearding in .NET?

946


What is Entity Relationship Model in .NET?

1037


Difference between class and interface in .net?

1004


How to create multiple inheritance in c#, with example?

1007


How do I spawn a thread?

917


How boxing and unboxing occures in memory?

1093


What is the difference between asp.net & vb.net and explain architecture?

998


How can you turn-on and turn-off cas?

922


What are asp.net authentication providers and iis security?

985


What is the new three features of COM+ services, which are not there in COM (MTS)

1908