Queryable.MinBy Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Overloads
| Name | Description |
|---|---|
| MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>) |
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie. |
| MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>) |
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie. |
| MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TSource>) |
Verouderd.
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie. |
MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>)
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static TSource MinBy(System::Linq::IQueryable<TSource> ^ source, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector);
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector);
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> -> 'Source
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")>]
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> -> 'Source
<Extension()>
Public Function MinBy(Of TSource, TKey) (source As IQueryable(Of TSource), keySelector As Expression(Of Func(Of TSource, TKey))) As TSource
Type parameters
- TSource
Het type van de elementen van source.
- TKey
Het type sleutel om elementen te vergelijken.
Parameters
- source
- IQueryable<TSource>
Een reeks waarden om de minimumwaarde van te bepalen.
- keySelector
- Expression<Func<TSource,TKey>>
Een functie om de sleutel voor elk element te extraheren.
Retouren
De waarde met de minimale sleutel in de reeks.
- Kenmerken
Uitzonderingen
source is null.
Er is geen sleutel geëxtraheerd uit source de IComparable implementatie of IComparable<T> interface.
Van toepassing op
MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TKey>)
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static TSource MinBy(System::Linq::IQueryable<TSource> ^ source, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IComparer<TKey>? comparer);
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IComparer<'Key> -> 'Source
<Extension()>
Public Function MinBy(Of TSource, TKey) (source As IQueryable(Of TSource), keySelector As Expression(Of Func(Of TSource, TKey)), comparer As IComparer(Of TKey)) As TSource
Type parameters
- TSource
Het type van de elementen van source.
- TKey
Het type sleutel om elementen te vergelijken.
Parameters
- source
- IQueryable<TSource>
Een reeks waarden om de minimumwaarde van te bepalen.
- keySelector
- Expression<Func<TSource,TKey>>
Een functie om de sleutel voor elk element te extraheren.
- comparer
- IComparer<TKey>
De IComparer<T> om sleutels te vergelijken.
Retouren
De waarde met de minimale sleutel in de reeks.
Uitzonderingen
source is null.
Er is geen sleutel geëxtraheerd uit source de IComparable implementatie of IComparable<T> interface.
Van toepassing op
MinBy<TSource,TKey>(IQueryable<TSource>, Expression<Func<TSource,TKey>>, IComparer<TSource>)
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
- Bron:
- Queryable.cs
Let op
The Queryable MinBy and MaxBy taking an IComparer<TSource> are obsolete. Use the new ones that take an IComparer<TKey>.
Retourneert de minimumwaarde in een algemeen IQueryable<T> op basis van een opgegeven sleutelkiezerfunctie.
public:
generic <typename TSource, typename TKey>
[System::Runtime::CompilerServices::Extension]
static TSource MinBy(System::Linq::IQueryable<TSource> ^ source, System::Linq::Expressions::Expression<Func<TSource, TKey> ^> ^ keySelector, System::Collections::Generic::IComparer<TSource> ^ comparer);
[System.Obsolete("The Queryable MinBy and MaxBy taking an IComparer<TSource> are obsolete. Use the new ones that take an IComparer<TKey>.", DiagnosticId="SYSLIB0061", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
[System.Runtime.CompilerServices.OverloadResolutionPriority(-1)]
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IComparer<TSource>? comparer);
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IComparer<TSource>? comparer);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")]
public static TSource? MinBy<TSource,TKey>(this System.Linq.IQueryable<TSource> source, System.Linq.Expressions.Expression<Func<TSource,TKey>> keySelector, System.Collections.Generic.IComparer<TSource>? comparer);
[<System.Obsolete("The Queryable MinBy and MaxBy taking an IComparer<TSource> are obsolete. Use the new ones that take an IComparer<TKey>.", DiagnosticId="SYSLIB0061", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
[<System.Runtime.CompilerServices.OverloadResolutionPriority(-1)>]
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IComparer<'Source> -> 'Source
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IComparer<'Source> -> 'Source
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Enumerating collections as IQueryable can require creating new generic types or methods, which requires creating code at runtime. This may not work when AOT compiling.")>]
static member MinBy : System.Linq.IQueryable<'Source> * System.Linq.Expressions.Expression<Func<'Source, 'Key>> * System.Collections.Generic.IComparer<'Source> -> 'Source
<Extension()>
Public Function MinBy(Of TSource, TKey) (source As IQueryable(Of TSource), keySelector As Expression(Of Func(Of TSource, TKey)), comparer As IComparer(Of TSource)) As TSource
Type parameters
- TSource
Het type van de elementen van source.
- TKey
Het type sleutel om elementen te vergelijken.
Parameters
- source
- IQueryable<TSource>
Een reeks waarden om de minimumwaarde van te bepalen.
- keySelector
- Expression<Func<TSource,TKey>>
Een functie om de sleutel voor elk element te extraheren.
- comparer
- IComparer<TSource>
De IComparer<T> om sleutels te vergelijken.
Retouren
De waarde met de minimale sleutel in de reeks.
- Kenmerken
Uitzonderingen
source is null.
Er is geen sleutel geëxtraheerd uit source de IComparable implementatie of IComparable<T> interface.