Редагувати

Поділитися через


ParallelEnumerable.ThenByDescending Method

Definition

Performs in parallel a subsequent ordering of the elements in a sequence in descending order.

Overloads

ThenByDescending<TSource,TKey>(OrderedParallelQuery<TSource>, Func<TSource,TKey>)

Performs in parallel a subsequent ordering of the elements in a sequence in descending order, according to a key.

ThenByDescending<TSource,TKey>(OrderedParallelQuery<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Performs in parallel a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.

ThenByDescending<TSource,TKey>(OrderedParallelQuery<TSource>, Func<TSource,TKey>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Performs in parallel a subsequent ordering of the elements in a sequence in descending order, according to a key.

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

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
OrderedParallelQuery<TSource>

An OrderedParallelQuery{TSource} that contains elements to sort.

keySelector
Func<TSource,TKey>

A function to extract a key from an element.

Returns

A sequence whose elements are sorted descending according to a key.

Exceptions

source or keySelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

Remarks

In contrast to the sequential implementation, this is not a stable sort. See the remarks for OrderBy for an approach to implementing a stable sort.

See also

Applies to

ThenByDescending<TSource,TKey>(OrderedParallelQuery<TSource>, Func<TSource,TKey>, IComparer<TKey>)

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

Performs in parallel a subsequent ordering of the elements in a sequence in descending order by using a specified comparer.

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

Type Parameters

TSource

The type of elements of source.

TKey

The type of the key returned by keySelector.

Parameters

source
OrderedParallelQuery<TSource>

An OrderedParallelQuery{TSource} that contains elements to sort.

keySelector
Func<TSource,TKey>

A function to extract a key from an element.

comparer
IComparer<TKey>

An IComparer{TKey} to compare keys.

Returns

A sequence whose elements are sorted descending according to a key.

Exceptions

source or keySelector is a null reference (Nothing in Visual Basic).

One or more exceptions occurred during the evaluation of the query.

Remarks

In contrast to the sequential implementation, this is not a stable sort. See the remarks for OrderBy for an approach to implementing a stable sort.

See also

Applies to