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!
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