Inheritance is the process of accessing data fields, methods and properties of base class into its derived class.
Difference between multiple and multilevel Inheritance:
Multiple Inheritance
Multilevel Inheritance
In multiple inheritance there are more than one parent class of a single child class
In multilevel inheritance there are only one parent class of a child class
Multiple inheritance is not used directly in c#.
It is used directly in c# programming
To use of multiple inheritance in c# by using interface
It is used normally by inheriting of base class into its child class.
Multiple inheritance is more complex for using in c#
Multilevel is easy to use than multiple inheritance
interface Base() { //statement of base interface } interface Base1 { //statement of Base1 interface }class child : Base, Base1 { //statement of child class }
class Base { //statement of Base class } class child : Base { //statement of child class and inherits all accessible statement of base class }class child2 : child { //statement of child2 class and all accessible statement of child class }
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Inheritance is the process of accessing data fields, methods and properties of base class into its derived class.
Difference between multiple and multilevel Inheritance: