Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 35736

A word of caution while Overloading Methods in C#

$
0
0
  While working with Method Overloading, there are some corner cases which we should be careful about. So we know overloading is possible when parameter type and parameter order. But there is a lot which also depends on what parameter values are you using. For instance public void Foo( int x, float y) { // Do something useful } public void Foo( float a, int b) { // Do something useful here too }   In this scenario, weather the code compiles well or not depends...(read more)

Viewing all articles
Browse latest Browse all 35736

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>