What is Inheritance in C# .Net ?
Inheritance: Inheritance is the strong concept of the world of object-oriented programing. In a Simple word, The mechanism of accessing or extending the behavior or properties of an existing class is known as Inheritance. For an example, If a class has methods let say Add(int s, int n) and its added two given values. So if we are going to create any class and we want to create an Add function of two variable then why we create it from scratch if this is available in an existing class. Yes, We can use the Add function of existing class in a new class as below: public class ExistingClass { public int Add(int s, int n) { return s+n; } } and the new class is: public class NewClass : ExistingClass { base.Add(110,210); // this will call the existing methods }