Answers

Question and Answer:

  Home  Senior .Net Developer

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

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.

 141 views

More Questions for you: