Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: ValueTuple<T, int, TValue>? MaxTupleOrNull<T, TValue>(this IEnumerable<T>, Func<T, TValue>)

Declaration

public static ValueTuple<T, int, TValue>? MaxTupleOrNull<T, TValue>(
    this IEnumerable<T> source,
    Func<T, TValue> valueSelector
)

Summary

Returns the first element from the input sequence for which the value selector returns the largest value, its index, as well as that largest value, or null if the collection is empty.

Generic type parameters

T
  • Must derive from: System.ValueType.
  • Must have a default constructor.
  • Must be a non-nullable value type.
This type parameter is not documented.
TValue
  • Must derive from: System.IComparable<TValue>.
This type parameter is not documented.