Consider two methods with same name, but different parameters:
private void Method(int number) => Debug.WriteLine("I'm method 01");
private void Method(int number, string name = "") => Debug.WriteLine("I'm method 02");
Theoretically if we call Method(0);
, both methods are applicable. There are no errors/warnings.
Debugging shows that the compiler takes the method 01 - is there any rule for that?
Is there no danger that method 02 gets invoked?