AsyncEnumerable.OrderDescending<T> Method

Definition

Sorts the elements of a sequence in descending order.

C#
public static System.Linq.IOrderedAsyncEnumerable<T> OrderDescending<T>(this System.Collections.Generic.IAsyncEnumerable<T> source, System.Collections.Generic.IComparer<T>? comparer = default);

Type Parameters

T

The type of the elements of source.

Parameters

source
IAsyncEnumerable<T>

A sequence of values to order.

comparer
IComparer<T>

An IComparer<T> to compare keys.

Returns

An IAsyncEnumerable<T> whose elements are sorted in descending order.

Exceptions

source is null.

Applies to

Product Versions
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided), 10
.NET Standard 2.0 (package-provided)