Senior .Net Developer Question:
Download Questions PDF

What is the concept of inheritance and how it works in .NET?

Answer:

In general OOP terms, inheritance means that a class can be based on another class, with the child class taking on the attributes of the parent class. For example, coders can create a class called Vehicle, and then child classes called Truck, Car and Motorcycle — all of which inherit the attributes of Vehicle.

To demonstrate their understanding of the interview question and the framework, candidates may bring up how .NET supports single inheritance only, which means that a class can inherit only from one other class. Their answer may also touch on the transitive nature of inheritance — for example, the Ford class inherits from Car, which inherits from Vehicle.

Download Senior .Net Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Please explain what are an object and a class?Explain me difference between public and static modifiers?