What is inheritance and how many types of inheritance in OOPs?
What is inheritance and how many types of inheritance in OOPs?
Hi, my self Ravi Vishwakarma. I have completed my studies at SPICBB Varanasi. now I completed MCA with 76% form Veer Bahadur Singh Purvanchal University Jaunpur.
SWE @ MindStick | Software Engineer | Web Developer | .Net Developer | Web Developer | Backend Engineer | .NET Core Developer
Ashutosh Kumar Verma
31-Aug-2021Inheritance 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.