EnumerableRowCollectionExtensions.OrderByDescending 方法

定義

依遞減順序排序 EnumerableRowCollection 的資料列。

多載

OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>)

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

依據指定的索引鍵,按遞減順序排序 EnumerableRowCollection 的資料列。

OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>)

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

依據指定的索引鍵和比較子,按遞減順序排序 EnumerableRowCollection 的資料列。

OrderByDescending<TRow,TKey>(EnumerableRowCollection<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> ^ OrderByDescending(System::Data::EnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector);
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow,TKey> (this System.Data.EnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector);
static member OrderByDescending : System.Data.EnumerableRowCollection<'Row> * Func<'Row, 'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function OrderByDescending(Of TRow, TKey) (source As EnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey)) As OrderedEnumerableRowCollection(Of TRow)

類型參數

TRow

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

TKey

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

參數

source
EnumerableRowCollection<TRow>

EnumerableRowCollection,包含要排序的 DataRow 項目。

keySelector
Func<TRow,TKey>

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

傳回

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

備註

這個方法是使用延後執行來實作。 立即傳回值是一個物件,會儲存執行動作所需的所有資訊。 除非直接呼叫其 GetEnumerator 方法 foreach 或在 Visual C# For Each 或 Visual Basic 中使用 來列舉對象,否則不會執行這個方法所代表的查詢。

另請參閱

適用於

OrderByDescending<TRow,TKey>(EnumerableRowCollection<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> ^ OrderByDescending(System::Data::EnumerableRowCollection<TRow> ^ source, Func<TRow, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow,TKey> (this System.Data.EnumerableRowCollection<TRow> source, Func<TRow,TKey> keySelector, System.Collections.Generic.IComparer<TKey> comparer);
static member OrderByDescending : System.Data.EnumerableRowCollection<'Row> * Func<'Row, 'Key> * System.Collections.Generic.IComparer<'Key> -> System.Data.OrderedEnumerableRowCollection<'Row>
<Extension()>
Public Function OrderByDescending(Of TRow, TKey) (source As EnumerableRowCollection(Of TRow), keySelector As Func(Of TRow, TKey), comparer As IComparer(Of TKey)) As OrderedEnumerableRowCollection(Of TRow)

類型參數

TRow

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

TKey

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

參數

source
EnumerableRowCollection<TRow>

EnumerableRowCollection,包含要排序的 DataRow 項目。

keySelector
Func<TRow,TKey>

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

comparer
IComparer<TKey>

用來比較金鑰的 IComparer<T>

傳回

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

備註

這個方法是使用延後執行來實作。 立即傳回值是一個物件,會儲存執行動作所需的所有資訊。 除非直接呼叫其 GetEnumerator 方法 foreach 或在 Visual C# For Each 或 Visual Basic 中使用 來列舉對象,否則不會執行這個方法所代表的查詢。

另請參閱

適用於