AsyncEnumerable.OrderBy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
|
OrderBy |
Sorts the elements of a sequence in ascending order. |
|
OrderBy |
Sorts the elements of a sequence in ascending order. |
OrderBy(IAsyncEnumerable, Func>, IComparer)
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
Sorts the elements of a sequence in ascending order.
public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, Func> keySelector, System.Collections.Generic.IComparer? comparer = default);
static member OrderBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<'Key>> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>
Public Function OrderBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, CancellationToken, ValueTask(Of TKey)), Optional comparer As IComparer(Of TKey) = Nothing) As IOrderedAsyncEnumerable(Of TSource)
Type Parameters
- TSource
The type of the elements of source.
- TKey
The type of the key returned by keySelector.
Parameters
- source
-
IAsyncEnumerable
A sequence of values to order.
Returns
An IAsyncEnumerable
Exceptions
keySelector is null.
Applies to
OrderBy(IAsyncEnumerable, Func, IComparer)
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
- Source:
- OrderBy.cs
Sorts the elements of a sequence in ascending order.
public static System.Linq.IOrderedAsyncEnumerable OrderBy(this System.Collections.Generic.IAsyncEnumerable source, Func keySelector, System.Collections.Generic.IComparer? comparer = default);
static member OrderBy : System.Collections.Generic.IAsyncEnumerable<'Source> * Func<'Source, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Linq.IOrderedAsyncEnumerable<'Source>
Public Function OrderBy(Of TSource, TKey) (source As IAsyncEnumerable(Of TSource), keySelector As Func(Of TSource, TKey), Optional comparer As IComparer(Of TKey) = Nothing) As IOrderedAsyncEnumerable(Of TSource)
Type Parameters
- TSource
The type of the elements of source.
- TKey
The type of the key returned by keySelector.
Parameters
- source
-
IAsyncEnumerable
A sequence of values to order.
- keySelector
-
Func
A function to extract a key from an element.
Returns
An IAsyncEnumerable
Exceptions
keySelector is null.