Queryable.MaxBy Yöntem

Tanım

Aşırı Yüklemeler

MaxBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)

Belirtilen anahtar seçici işlevine göre bir geneldeki IQueryable<T> en büyük değeri döndürür.

MaxBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TSource>)

Belirtilen anahtar seçici işlevine göre bir geneldeki IQueryable<T> en büyük değeri döndürür.

MaxBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)

Kaynak:
Queryable.cs
Kaynak:
Queryable.cs
Kaynak:
Queryable.cs

Belirtilen anahtar seçici işlevine göre bir geneldeki IQueryable<T> en büyük değeri döndürür.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static TSource MaxBy(System::Linq::IQueryable<TSource> ^ source, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector);
public static TSource? MaxBy<TSource,TKey> (this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector);
static member MaxBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> -> 'Source
<Extension()>
Public Function MaxBy(Of TSource, TKey) (source As IQueryable(Of TSource), keySelector As Expression(Of Func(Of TSource, TKey))) As TSource

Tür Parametreleri

TSource

öğelerinin sourcetürü.

TKey

Öğeleri karşılaştıracak anahtarın türü.

Parametreler

source
IQueryable<TSource>

En büyük değerini belirlemek için bir değer dizisi.

keySelector
Expression<Func<TSource,TKey>>

Her öğenin anahtarını ayıklamak için bir işlev.

Döndürülenler

TSource

Dizide en büyük anahtara sahip değer.

Özel durumlar

source, null değeridir.

veya IComparable<T> arabirimini uygulamadan sourceIComparable ayıklanan anahtar yok.

Şunlara uygulanır

MaxBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TSource>)

Kaynak:
Queryable.cs
Kaynak:
Queryable.cs
Kaynak:
Queryable.cs

Belirtilen anahtar seçici işlevine göre bir geneldeki IQueryable<T> en büyük değeri döndürür.

public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static TSource MaxBy(System::Linq::IQueryable<TSource> ^ source, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector, System::Collections::Generic::IComparer<TSource> ^ comparer);
public static TSource? MaxBy<TSource,TKey> (this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IComparer<TSource>? comparer);
static member MaxBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IComparer<'Source> -> 'Source
<Extension()>
Public Function MaxBy(Of TSource, TKey) (source As IQueryable(Of TSource), keySelector As Expression(Of Func(Of TSource, TKey)), comparer As IComparer(Of TSource)) As TSource

Tür Parametreleri

TSource

öğelerinin sourcetürü.

TKey

Öğeleri karşılaştıracak anahtarın türü.

Parametreler

source
IQueryable<TSource>

En büyük değerini belirlemek için bir değer dizisi.

keySelector
Expression<Func<TSource,TKey>>

Her öğenin anahtarını ayıklamak için bir işlev.

comparer
IComparer<TSource>

IComparer<T> Anahtarları karşılaştırmak için.

Döndürülenler

TSource

Dizide en büyük anahtara sahip değer.

Özel durumlar

source, null değeridir.

veya IComparable<T> arabirimini uygulamadan sourceIComparable ayıklanan anahtar yok.

Şunlara uygulanır