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.
Online Puzzle Test for Bank Exams More
Medical Microbiology MCQS with Answers Pdf More
Medical Microbiology Quiz Questions and Answers Pdf More
Microbiology Multiple Choice Questions and Answers Pdf More
Challenging Logic Puzzles Pdf with Answers More
1000+ Math Puzzles Brain Teasers with Answers More
1000+ Computer Awareness MCQ Questions for Banking Exams More
Top 1000+ IQ Puzzles Online Test Questions and Answers More
1000+ General English Quiz with Answers for Competitive Exams Pdf More
1000+ DC Motor Objective Questions and Answers Pdf More