Senior .Net Developer Question: Download Senior .Net Developer PDF

Please explain what inheritance is, and why it’s important?

Tweet Share WhatsApp

Answer:

Inheritance is one of the most important concepts in object-oriented programming, together with encapsulation and polymorphism. Inheritance allows developers to create new classes that reuse, extend, and modify the behavior defined in other classes. This enables code reuse and speeds up development. With inheritance, developers can write and debug one class only once, and then reuse that same code as the basis for the new classes. The class whose members are inherited is called the base class, and the class that inherits those members is called the derived class. By default, all classes in .NET are inheritable.

Download Senior .Net Developer PDF Read All 60 Senior .Net Developer Questions
Previous QuestionNext Question
Tell us the difference between managed and unmanaged code?What is implement a generic action in WebAPI?