Understanding method meaning...
Given the following extension\utility\helper method
public static string CommaSeparate<T, U>(this IEnumerable<T> source, Func<T, U> func)
{ return string.Join(",", source.Select(s => func(s).ToString()).ToArray()); }
Im having difficulty in understanding it easily\fully...
My concerns are:-
Why are both T and U needed after CommaSeperate and not just T?
How and why is the Select method mapping to the Func delegate func, by simply s => func(s) ?
Regards
Steve