AlgorithmsMinimumT Method (IEnumerableT, IComparerT) |
Finds the minimum value in a collection. A supplied IComparer<T> is used
to compare the items in the collection.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static T Minimum<T>(
IEnumerable<T> collection,
IComparer<T> comparer
)
public:
generic<typename T>
static T Minimum(
IEnumerable<T>^ collection,
IComparer<T>^ comparer
)
Parameters
- collection
- Type: System.Collections.GenericIEnumerableT
The collection to search. - comparer
- Type: System.Collections.GenericIComparerT
The comparer instance used to compare items in the collection.
Type Parameters
- T
- The type of items in the collection.
Return Value
Type:
TThe smallest item in the collection.
Exceptions
See Also