ComparableExtensions.Max<T>

Extension Method in ComparableExtensions

Declaration

public static T Max<T>(this T[] values)
    where T : IComparable<T>

Description

Returns the maximum value in the array.

Type Parameters

TThe type of value to check.

Parameters

valuesThe values to check.

Returns

TThe maximum value in the array.

Overload

Declaration

public static T Max<T>(this List<T> values)
    where T : IComparable<T>

Description

Returns the maximum value in the list.

Type Parameters

TThe type of value to check.

Parameters

valuesThe values to check.

Returns

TThe maximum value in the list.