Question: Given the following two method signatures, explain the reasoning behind how the C# compiler determines which method version to invoke for the call MyMethod(12)

Given the following two method signatures, explain the reasoning behind how the C# compiler determines which method version to invoke for the call MyMethod(12) (note: assume both methods coexist): private static void MyMethod(int a) private static void MyMethod (int a, char b = 'B') The first version is better because no optional parameter are omitted The second version is better because there are optional parameters Both method signatures are equal None of the method signatures are valid
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
The correct choice for the above question is option a that is The first version is better because no ... View full answer
Get step-by-step solutions from verified subject matter experts
