TypedTableBaseExtensions.OrderBy 方法

定義

依遞增順序排序 TypedTableBase<T> 的資料列。

多載

OrderBy<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>)

依據指定的索引鍵,按遞增順序排序 TypedTableBase<T> 的資料列。

OrderBy<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>, IComparer<TKey>)

依據指定的索引鍵和比較子,按遞增順序排序 TypedTableBase<T> 的資料列。

OrderBy<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>)

來源:
TypedTableBaseExtensions.cs
來源:
TypedTableBaseExtensions.cs
來源:
TypedTableBaseExtensions.cs

依據指定的索引鍵,按遞增順序排序 TypedTableBase<T> 的資料列。

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

類型參數

TRow

source 中資料列項目的型別,通常是 DataRow

TKey

keySelector 所傳回之索引鍵的型別。

參數

source
TypedTableBase<TRow>

TypedTableBase<T>,其中包含要排序的 DataRow 項目。

keySelector
Func<TRow,TKey>

用來從項目擷取索引鍵的函式。

傳回

OrderedEnumerableRowCollection<TRow>,其項目排序依據是指定的索引鍵。

適用於

OrderBy<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>, IComparer<TKey>)

來源:
TypedTableBaseExtensions.cs
來源:
TypedTableBaseExtensions.cs
來源:
TypedTableBaseExtensions.cs

依據指定的索引鍵和比較子,按遞增順序排序 TypedTableBase<T> 的資料列。

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

類型參數

TRow

source 中資料列項目的型別,通常是 DataRow

TKey

keySelector 所傳回之索引鍵的型別。

參數

source
TypedTableBase<TRow>

TypedTableBase<T>,其中包含要排序的 DataRow 項目。

keySelector
Func<TRow,TKey>

用來從項目擷取索引鍵的函式。

comparer
IComparer<TKey>

用來比較金鑰的 IComparer<T>

傳回

OrderedEnumerableRowCollection<TRow>,其項目是根據指定的索引鍵和比較子進行排序。

適用於