C# Methods differ only by optional parameters -


i have found topic, it's vb...and error: vb issue

here method signatures. notice 1 has different return type.

public static bool populaterunwithsimplevaluebyfieldidsync(string fieldvalue, string fieldid, iviewmodel myself, int index) 

vs

public static void populaterunwithsimplevaluebyfieldidsync(string fieldvalue, string fieldid, iviewmodel myself, int index = 0, populatedonecallback populatedone = null) 

the actual call making:

populaterunwithsimplevaluebyfieldidsync(date, dtx.datefield, saver, index); 

the compiler decided pick first method, , not give me error. once first method removed (it unused code), started calling second method.

is there option somewhere treat error?

you're going need use form of 3rd party code analysis if want flagged @ compile time, since c# language specs define current behavior should happen.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -