ParallelEnumerable.OrderByDescending メソッド

定義

シーケンスの要素を降順に並べ替えます。

オーバーロード

OrderByDescending<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)

シーケンスの要素をキーに従って並列で降順に並べ替えます。

OrderByDescending<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定された比較子を使用してシーケンスの要素を降順に並べ替えます。

OrderByDescending<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>)

シーケンスの要素をキーに従って並列で降順に並べ替えます。

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

型パラメーター

TSource

source の要素の型。

TKey

keySelector によって返されるキーの型。

パラメーター

source
ParallelQuery<TSource>

順序付ける値のシーケンス。

keySelector
Func<TSource,TKey>

要素からキーを抽出する関数。

戻り値

OrderedParallelQuery<TSource>

要素がキーに従って降順に並べ替えられている OrderedParallelQuery{TSource}。

例外

source または keySelector が null 参照 (Visual Basic の場合は Nothing) です。

WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken) 経由で渡されたトークンで、クエリが取り消されました。

クエリ評価中に 1 つまたは複数の例外が発生しました。

注釈

シーケンシャル実装とは対照的に、これは安定した並べ替えではありません。 安定した並べ替えを実装する方法については、解説 OrderBy を参照してください。

こちらもご覧ください

適用対象

OrderByDescending<TSource,TKey>(ParallelQuery<TSource>, Func<TSource,TKey>, IComparer<TKey>)

指定された比較子を使用してシーケンスの要素を降順に並べ替えます。

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

型パラメーター

TSource

source の要素の型。

TKey

keySelector によって返されるキーの型。

パラメーター

source
ParallelQuery<TSource>

順序付ける値のシーケンス。

keySelector
Func<TSource,TKey>

要素からキーを抽出する関数。

comparer
IComparer<TKey>

キーを比較する IComparer{TKey}。

戻り値

OrderedParallelQuery<TSource>

要素がキーに従って降順に並べ替えられている OrderedParallelQuery{TSource}。

例外

source または KeySelector が null 参照 (Visual Basic の場合は Nothing) です。

WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken) 経由で渡されたトークンで、クエリが取り消されました。

クエリ評価中に 1 つまたは複数の例外が発生しました。

注釈

シーケンシャル実装とは対照的に、これは安定した並べ替えではありません。 安定した並べ替えを実装する方法については、解説 OrderBy を参照してください。

こちらもご覧ください

適用対象