What is Overloading?
Can you please explain
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Vipul JainRank #245 · 10.2K reputationPosted Jun 3, 2019, 9:42 PM EDT
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Jun 3, 2019, 9:49 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 3, 2019, 10:00 PM EDT
Akash Ghadage38 reputationPosted Jul 4, 2019, 3:39 AM EDT
Hi Jay,
Unlike Java, C# allows operators to be overloaded, in addition to methods, by defining static members using the operator keyword. This feature helps to extend and customize the semantics of operators relevant to user-defined types so that they can be used to manipulate object instances with operators.
The overload resolution in C# is the method by which the right function is selected on the basis of arguments passed and the list of candidate function members that have the same name. The different contexts in which the overload resolution is used include:
It is recommended to avoid overloading across inheritance boundaries because it can cause confusion. Overloading can become cumbersome to developers if it is used excessively and with user-defined types as parameters because it can reduce the readability and maintainability of code.
Ganesh SanapRank #3,772 · 392 reputationPosted Jul 10, 2019, 12:06 AM EDT
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 14, 2019, 7:47 AM EST