你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

GeneralUtilities.MaxOrDefault<T,TResult> Method

Definition

public static TResult MaxOrDefault<T,TResult> (this System.Collections.Generic.IEnumerable<T> sequence, Func<T,TResult> selector, TResult defaultValue);
static member MaxOrDefault : seq<'T> * Func<'T, 'Result> * 'Result -> 'Result
<Extension()>
Public Function MaxOrDefault(Of T, TResult) (sequence As IEnumerable(Of T), selector As Func(Of T, TResult), defaultValue As TResult) As TResult

Type Parameters

T
TResult

Parameters

sequence
IEnumerable<T>
selector
Func<T,TResult>
defaultValue
TResult

Returns

TResult

Applies to