Method MaxBy
- Namespace
- GeometryHelper.Extension
- Assembly
- GeometryHelper.dll
MaxBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>, IComparer<TKey>)
Returns the element that yields the maximum value for a selector function.
public static TSource MaxBy<TSource, TKey>(this IEnumerable<TSource> source, Func<TSource, TKey> selector, IComparer<TKey> comparer = null)
Parameters
sourceIEnumerable<TSource>selectorFunc<TSource, TKey>comparerIComparer<TKey>
Returns
- TSource
Type Parameters
TSourceTKey