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):private static void MyMethod(int a)private static void MyMethod(int a, char b = 'B')

What will be an ideal response?

If two signatures are equally good, the one that does not omit optional parameters is considered better. If either method existed alone, the call MyMethod(12) would work. But when the two coexist, the first version is better because no optional parameters are omitted.

Computer Science & Information Technology

You might also like to view...

When a(n) ________ function is nested in the logical_test argument of an IF function, both logical tests need to be TRUE for the [value_if_true] argument to be returned

Fill in the blank(s) with correct word

Computer Science & Information Technology

In AppLocker the Audit Only option enables you to determine who is using which applications in your company without enforcing the rules you have specified

Indicate whether the statement is true or false

Computer Science & Information Technology