Inheritance is a technique to access of data and methods of a class into its derived class. The main purpose to using inheritance in programming to reduce the length of code and easily develop the code.
Types of Inheritance in OOps-
There are generally 3 types of inheritance are defined in c# which are-
1-Single Inheritance
2- multilevel Inheritance
3- Hierarchical Inheritance
There are one more types of inheritance can used in c# named is 'Multiple Inheritance'. Multiple inheritance is not directly used by class because a single class can inherits only one base class at a time. By using interface we use the multiple inheritance in our program.
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 in OOPs-
Inheritance is a technique to access of data and methods of a class into its derived class. The main purpose to using inheritance in programming to reduce the length of code and easily develop the code.
Types of Inheritance in OOps-
There are generally 3 types of inheritance are defined in c# which are-
1- Single Inheritance
2- multilevel Inheritance
3- Hierarchical Inheritance
There are one more types of inheritance can used in c# named is 'Multiple Inheritance'. Multiple inheritance is not directly used by class because a single class can inherits only one base class at a time. By using interface we use the multiple inheritance in our program.