What is the difference between override and overload in a method?



What is the difference between override and overload in a method?..

Answer / Kumar Amit

In .NET, both Override and Overload are used to modify existing methods but they do it differently:nn- Override: It allows a derived class to provide its own implementation of an inherited virtual or abstract method. The signature (name, return type, parameters) must be the same as in the base class.n- Overload: It refers to having more than one method with the same name but different signatures (different number of parameters, different data types of parameters, or both). It does not involve inheritance.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net General Interview Questions

Explain clr, cts and cls?

1 Answers  


If we want to write a Windows service that cannot be paused, only started and stopped. How to accomplish that?

1 Answers  


What is RunTime Polymorphism?

5 Answers   Deloitte, eClerx, Horizon, Intel, Pragna Technologies,


How to create multiple inheritance in c#, with example?

1 Answers  


What is the advantage of packaging over xcopy in .net?

1 Answers  


How can you assign an rgb color to a system.drawing.color object?

1 Answers  


Explain about managed heap?

1 Answers  


Explain memory-mapped files.

1 Answers  


What is multiThreading in .NET?

1 Answers  


What is RPC? What is the use of it?

1 Answers   Accenture,


What is the difference between .net and laravel?

1 Answers  


How will you load dynamic assembly? How will create assemblies at run time?

1 Answers   InfoAxon Technologies,


Categories