1.

The modifier used to hide the base class methods is?(a) Virtual(b) New(c) Override(d) SealedI have been asked this question in an international level competition.This interesting question is from Method Overriding topic in portion Object Oriented Concepts of C#

Answer»

Right OPTION is (b) New

The best I can EXPLAIN: Used in condition when we cannot use VIRTUALLY to override a base CLASS method. Hence, we use ‘New’ to hide the base class methods and redefine the method defined in the SUBCLASS.



Discussion

No Comment Found

Related InterviewSolutions