C# OOPS Interview Questions and Answers for Experienced - 1

Question: 1

Can you override private virtual methods?

No, moreover, you cannot access private methods in inherited classes, have to be protected in the base class to allow any sort of access.

Question: 2

What is polymorphism?

Mean by more than one form. Ability to provide different implementation based on different number/type of parameters.

Question: 3

What is pure-polymorphism?

When a method is declared as abstract/virtual method in a base class and which is overridden in a base class. If we create a variable of a type of a base class and assign an object of a derived class to it, it will be decided at a run time, which implementation of a method is to be called.
This is known as Pure-Polymorphism or Late-Binding.

Question: 4

What is a constructor?

A special Method Always called whenever an instance of the class is created.

Question: 5

What is a destructor?

A special method called by GC. Just before object is being reclaimed by GC.

Error Report!

Related Questions