AlgorithmsMaximumT Method (IEnumerableT) |
Finds the maximum value in a collection.
Namespace: X3Platform.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static T Maximum<T>(
IEnumerable<T> collection
)
where T : Object, IComparable<T>
public:
generic<typename T>
where T : Object, IComparable<T>
static T Maximum(
IEnumerable<T>^ collection
)
Parameters
- collection
- Type: System.Collections.GenericIEnumerableT
The collection to search.
Type Parameters
- T
- The type of items in the collection.
Return Value
Type:
TThe largest item in the collection.
Exceptions
RemarksValues in the collection are compared by using the IComparable<T>
interfaces implementation on the type T.
See Also