Inheritance in C# is a mechanism where a new class inherits properties and methods from an existing class. It promotes code reuse and establishes a relationship between classes.
Types of Inheritance
1. Single Inheritance
In single inheritance, a class inherits from only one base class.
Inherited members can be accessed directly in the derived class
C# doesn't support multiple inheritance of classes, but it can be achieved through interfaces
The base keyword can be used to access members of the base class
Remember, inheritance should be used to model "is-a" relationships between classes. Overuse of inheritance can lead to complex and hard-to-maintain code, so use it judiciously.