Method overloading - good or bad design?

天涯浪子 提交于 2019-12-05 05:10:39

Overloading has no impact on performance; it's resolved by the compiler at compile-time.

As for design guidance, see the design guidelines:

http://msdn.microsoft.com/en-us/library/ms229029.aspx

If you're using C# 4.0 you can save your fingers some work and use optional parameters.

  1. Performance impact, as far as I know, it's like defining a new method. The performance impact is space on your harddrive.
  2. Advisable to overload methods, Definitely, it's provides convenience
  3. What is the limit, As much Harddrive space as you have.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!