Difference between multilevel inhertiance vs multiple inhetiance in oops dotnet?

Posted by Raja123 under Interview Questions on 9/6/2010 | Points: 10 | Views : 1476 | Status : [Member] | Replies : 4
Multiple inhertiance is achived through interface How can we achieve multilevel inhertiance in dotnet. please give some clear information . it will useful for me and others visitor




Responses

Posted by: T.saravanan on: 9/6/2010 [Member] [MVP] Silver | Points: 25

Up
0
Down
Hi,

http://www.pragimtech.com/Inheritance.aspx

Refer this link

Cheers :)

Thanks,
T.Saravanan

Raja123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ayansaha909 on: 6/21/2017 [Member] Starter | Points: 25

Up
0
Down
You can see this post for better clarification

https://www.quora.com/What-is-diffrence-between-multilevel-and-multiple-inheritance-in-Java


Elegantit Services
www.elegantitservices.com

Raja123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shreedar on: 9/21/2017 [Member] Starter | Points: 25

Up
0
Down
Hi

Multiple Inheritance:

public class A

{

}
public class B
{

}
public class C:A,B // this is multiple Inheritance. This is not possible in c# using normal class.
{

}

By using interfaces we can achieve like below

interface IA

{
dosomething(); //abstract method
}
interface IB
{
dosomething(); //abstract method
}
public abstract myclass:IA,IB //This is possible
{

}


Multilevel Inheritance:

public class A

{

}
public class B:A
{

}
public class C:B
{

}
public class D:C
{

}

The above example is for multilevel inheritance .
Hope you got idea now about multiple and multilevel.

Regards

Sridhar Thota.
www.dotnet-sridhar.blogspot.com

Raja123, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sm2345110 on: 12/11/2017 [Member] Starter | Points: 25

Up
0
Down
Multiple Inheritance : we can inherit more than one class
in the same classe.

Multi-Level Inheritance: where onc class can inherit only
one base class and the derived class can become base class
of some othere class.
http://www.cetpainfotech.com/technology/dot-net-training

Raja123, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response