EnumerableRowCollectionExtensions.ThenBy 方法

定義

依遞增順序,執行 EnumerableRowCollection 中資料列的次要排序作業。

多載

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

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

依據指定的索引鍵,按遞增順序執行 EnumerableRowCollection 中資料列的次要排序作業。

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

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

依據指定的索引鍵和比較子,按遞增順序執行 EnumerableRowCollection 中資料列的次要排序作業。

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

來源:
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# 或 Visual Basic 中使用 foreach 來列舉對象,否則 For Each 不會執行這個方法所表示的查詢。

另請參閱

適用於

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

來源:
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, 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# 或 Visual Basic 中使用 foreach 來列舉對象,否則 For Each 不會執行這個方法所表示的查詢。

另請參閱

適用於