EnumerableRowCollectionExtensions.ThenBy メソッド

定義

EnumerableRowCollectionの行の 2 次順序を昇順で実行します。

オーバーロード

名前 説明
ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

指定したキーに従って、 EnumerableRowCollection の行の 2 次順序を昇順で実行します。

ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>)

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

指定したキーと比較子に従って、 EnumerableRowCollection の行の 2 次順序を昇順で実行します。

ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>)

指定したキーに従って、 EnumerableRowCollection の行の 2 次順序を昇順で実行します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
generic <typename TRow, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Data::OrderedEnumerableRowCollection<TRow> ^ ThenBy(System::Data::OrderedEnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector);
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow,TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector);
static member ThenBy : System.Data.OrderedEnumerableRowCollection<'Row> * Func<'Row, 'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function ThenBy(Of TRow, TKey) (source As OrderedEnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey)) As OrderedEnumerableRowCollection(Of TRow)

型パラメーター

TRow

sourceの行要素の型 (通常はDataRow)。

TKey

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

パラメーター

keySelector
Func<TRow,TKey>

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

返品

指定したキーで要素が並べ替えられる OrderedEnumerableRowCollection<TRow>

注釈

ThenBy操作を使用するには、OrderByを使用した既存のプライマリ並べ替え操作が必要です。

このメソッドは、遅延実行を使用して実装されます。 即時戻り値は、アクションの実行に必要なすべての情報を格納するオブジェクトです。 このメソッドで表されるクエリは、GetEnumerator メソッドを直接呼び出すか、Visual C# で foreach を使用するか、Visual Basic で For Each を使用して、オブジェクトが列挙されるまで実行されません。

こちらもご覧ください

適用対象

ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>)

指定したキーと比較子に従って、 EnumerableRowCollection の行の 2 次順序を昇順で実行します。

この API は製品インフラストラクチャをサポートします。コードから直接使用するものではありません。

public:
generic <typename TRow, typename TKey>
[System::Runtime::CompilerServices::Extension]
 static System::Data::OrderedEnumerableRowCollection<TRow> ^ ThenBy(System::Data::OrderedEnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static System.Data.OrderedEnumerableRowCollection<TRow> ThenBy<TRow,TKey>(this System.Data.OrderedEnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer);
static member ThenBy : System.Data.OrderedEnumerableRowCollection<'Row> * Func<'Row, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function ThenBy(Of TRow, TKey) (source As OrderedEnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey), comparer As IComparer(Of TKey)) As OrderedEnumerableRowCollection(Of TRow)

型パラメーター

TRow

sourceの行要素の型 (通常はDataRow)。

TKey

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

パラメーター

keySelector
Func<TRow,TKey>

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

comparer
IComparer<TKey>

キーを比較する IComparer<T>

返品

指定したキーと比較子によって要素が並べ替えられる OrderedEnumerableRowCollection<TRow>

注釈

ThenBy操作を使用するには、OrderByを使用した既存のプライマリ並べ替え操作が必要です。

このメソッドは、遅延実行を使用して実装されます。 即時戻り値は、アクションの実行に必要なすべての情報を格納するオブジェクトです。 このメソッドで表されるクエリは、GetEnumerator メソッドを直接呼び出すか、Visual C# で foreach を使用するか、Visual Basic で For Each を使用して、オブジェクトが列挙されるまで実行されません。

こちらもご覧ください

適用対象