score:2

Accepted answer

This is not really an issue of specific LINQ extension method, but how optional parameters are handled for Funcs and Actions, in short - they are not, they are considered a regular parameter and default value is omitted when selecting a corresponding Func/Action signature. Take a look here Optional Parameters, No overload for 'Employee' matches delegate 'System.Func<Employee> or here Invoke Func<T1, T2, T3> which has optional parameters?.

In other words, your MyFunc cannot be used as Func<string, string>, you must use Func<string, int, string>, which in case of Select happens to be present as an overload with index added.


Related Query

More Query from same tag