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 does il do?

1018


How is .net able to support multiple languages?

1073


What is the difference between vb.net and vc#.net?

1296


How to manage pagination in a page using .net?

1057


How to get the number after decimal point in .net?

1060


Explain how to spawn a thread?

1027


What are Attributes in .NET?

1119


How do you generate a strong name?

1191


What is difference between system.string and system.stringbuilder classes?

1251


Please explain what are an inheritance, polymorphism, and encapsulation?

1163


What is .net standard?

1301


Explain the difference between managed and unmanaged code?

973


How does the generational garbage collector in the .net clr manage object lifetime? What is non-deterministic finalization?

1041


What is .net debug & trace?

1122


what is the meaning silverligt control

2178