Click or drag to resize
AlgorithmsIndexOfMinimumT Method (IListT, ComparisonT)
Finds the index of the minimum value in a list. A supplied Comparison<T> delegate is used to compare the items in the collection.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static int IndexOfMinimum<T>(
	IList<T> list,
	Comparison<T> comparison
)

Parameters

list
Type: System.Collections.GenericIListT
The list to search.
comparison
Type: SystemComparisonT
The comparison delegate used to compare items in the collection.

Type Parameters

T
The type of items in the list.

Return Value

Type: Int32
The index of the smallest item in the list. If the minimum value appears multiple times, the index of the first appearance is used.
Exceptions
ExceptionCondition
InvalidOperationExceptionThe collection is empty.
ArgumentNullExceptionlist or comparison is null.
See Also