C# OOPS Interview Questions and Answers for Experienced - 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.
What is polymorphism?
Mean by more than one form. Ability to provide different implementation based on different number/type of parameters.
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.
What is a constructor?
A special Method Always called whenever an instance of the class is created.
What is a destructor?
A special method called by GC. Just before object is being reclaimed by GC.
100+ Statement and Courses of Action Practice Questions Pdf More
100+ Statement and Course of Action Questions for SBI PO More
100+ Statement and Courses of Action Questions and Answers More
1001+ Puzzle Questions and Answers Pdf Download More
Top 1000+ Logic Maths IQ Test Questions and Answers More
Indus Valley Civilization Quiz Questions and Answers More
1000+ Applied Science Biology Quiz Questions Answers More
Top 100+ Fundamental Rights and Duties Gk Questions and Answers More
Geography Quiz Questions and Answers More
Top 1000+ Analogy Verbal Reasoning/Ability Questions & Answers More