Senior .Net Developer Question: Download Senior .Net Developer PDF

Please tell us what is the difference between Override and Overload in a method?

Tweet Share WhatsApp

Answer:

Override is to overwrite the method with the same signature (parameters and return type) but different functionality. Overwriting requires a “virtual” declaration of the method.

On the other hand, overloading refers to coding several versions of the same method. Though the “virtual” declaration for a method is not necessary to overload, it requires a different signature (parameters and/or return value).

Download Senior .Net Developer PDF Read All 60 Senior .Net Developer Questions
Previous QuestionNext Question
Do you know what is the difference between an abstract class and an interface?Tell us why do we use the “using” statement?