Click or drag to resize

CollectionExtensionsMaxByTSource, TKey Method (IEnumerableTSource, FuncTSource, TKey, IComparerTKey)

Finds the minimum element in the source as scored by the given function applied to a projection on the elements.

Namespace:  Gamelogic.Extensions.Algorithms
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static TSource MaxBy<TSource, TKey>(
	this IEnumerable<TSource> source,
	Func<TSource, TKey> selector,
	IComparer<TKey> comparer
)

Parameters

source
Type: System.Collections.GenericIEnumerableTSource
selector
Type: SystemFuncTSource, TKey
comparer
Type: System.Collections.GenericIComparerTKey

Type Parameters

TSource
TKey

Return Value

Type: TSource

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableTSource. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also