adspace
What is the difference between override and overload in a method?
Answer Posted / 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 View All Answers