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

What is the use com component in .net?

1 Answers  


I'm having some trouble with cas. How can I troubleshoot the problem?

1 Answers  


How to use datagrid value in select statements where condition ,if cell is hyperlink bounded column?

1 Answers  


Major role of CLR for CAS

2 Answers   Infosys,


Explain the difference between asp.net & vb.net and explain architecture?

1 Answers  


What are the differences between an interface and an abstract class in .net?

1 Answers  


What is .net assembly?

1 Answers  


Explain the difference between public and static modifiers?

1 Answers  


What is boxing?

3 Answers  


Explain code access security.

1 Answers  


What is an interface and what is an abstract class? Please, expand by examples of using both. Explain why?

1 Answers  


The project which you have made, which methodology did you use?

1 Answers   Wipro,


Categories