IndexOf<>(source, predicate, startIndex) IndexOf<>(source, element, comparer) JoinString<>(values, separator, prefix, suffix, lastSeparator) Order<>(source, comparer) SkipLast<>(source, count, throwIfNotEnough) Split<>(splitWhat, splitWhere) Split<>(source, chunkSize) ToDictionary2<>(source, key1Selector, key2Selector, comparer1, comparer2) ToDictionary2<>(source, key1Selector, key2Selector, elementSelector, comparer1, comparer2)
Legend Class Struct Enum Interface Delegate | Constructor Method Property Event Field |
| Extension method: TResult? MaxOrNull<TSource, TResult>(this IEnumerable<TSource>, Func<TSource, TResult>)Declarationpublic static TResult? MaxOrNull<TSource, TResult>(
this IEnumerable<TSource> source,
Func<TSource, TResult> selector
) Summary
Invokes a selector on each element of a collection and returns the maximum resulting value, or null if
the sequence is empty. Generic type parametersTSource |
The type of the elements of source. | TResult |
The type of the value returned by selector. |
Parametersthis IEnumerable<TSource> | source |
A sequence of values to determine the maximum value of. | Func<TSource, TResult> | selector |
A transform function to apply to each element. |
Returns
The maximum value in the sequence, or null if the sequence is empty. |