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

Explain the difference between public and static modifiers?

1152


Can you give an example of when it would be appropriate to use a web service as opposed to a non-serviced .NET component

2515


Explain how to redirect tracing to a file?

1016


What is singleton activation mode in .net?

1150


Explain boxing and unboxing in .net.

1010


Do you know what is garbage collector?

1021


SAP Business One(this is intigrated tool of .net)

2238


Is .net core stable?

920


Which file is taken by compiler when we have both file Application and Server Configuration file?

2127


What is reflection and what is it for?

1028


What is the use of system.diagnostics.process class in .net?

1045


How many types of transactions are there in com + .net ?

1075


What is 'Common Type System' (CTS) in .NET?

1130


What is WSDL? Explain its architecture?

1201


What is the use of common language runtime?

1072