語言

EnumerableRowCollectionExtensions.ThenBy 方法

定義

對 的 EnumerableRowCollection 列進行次級排序,從高到低。

多載

名稱 Description
ThenBy<TRow,TKey>(OrderedEnumerableRowCollection<TRow>, Func<TRow,TKey>)

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

依照指定的鍵,對 的 EnumerableRowCollection 列進行次級排序,從高到低。

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

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

依照指定的鍵與比較器,對 a EnumerableRowCollection 的列進行次級排序,從高到低。

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

來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs

依照指定的鍵,對 的 EnumerableRowCollection 列進行次級排序,從高到低。

此 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>)

來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs
來源:
EnumerableRowCollectionExtensions.cs

依照指定的鍵與比較器,對 a EnumerableRowCollection 的列進行次級排序,從高到低。

此 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,才會執行。

另請參閱

適用於