we can inherit all the properties and functions of one class to another. Suppose we have a Person class with methods like Walks(), Sleeps() and Eat(). Now let’s make a student class, and we know that a student is also a person. Here Inheritance comes in to hand. We can inherit properties and methods of Person class to Student Class by which Student class can access methods like Walks(), Sleeps() To inherit we just use : after the Student class and write Person. Similarly, we con override some methods of Person class also. To do this just add virtual keyword to the required method. Now in Student class just use override for that same method and you can now change the property of Person class.