Type of elements within the source iterable.
Type of key produced by keySelector.
The source iterable.
Selector used to project each element to the key used for comparison.
Optionalcomparator: OrderComparator<TKey, TKey>Optional order comparator used to compare keys. Defaults to the library's standard order comparison when omitted.
The element whose key is maximal.
Returns the element whose projected key is greatest according to the provided comparator.