EnumerableRowCollectionExtensions.OrderByDescending EnumerableRowCollectionExtensions.OrderByDescending EnumerableRowCollectionExtensions.OrderByDescending EnumerableRowCollectionExtensions.OrderByDescending Method

定义

按降序排序 EnumerableRowCollection 的行。Sorts the rows of a EnumerableRowCollection in descending order.

重载

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

按指定键降序排序 EnumerableRowCollection 的行。Sorts the rows of a EnumerableRowCollection in descending order according to the specified key.

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

按指定键和比较器降序排序 EnumerableRowCollection 的行。Sorts the rows of a EnumerableRowCollection in descending order according to the specified key and comparer.

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

按指定键降序排序 EnumerableRowCollection 的行。Sorts the rows of a EnumerableRowCollection in descending order according to the specified key.

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 中行元素的类型,通常为 DataRowThe type of the row elements in source, typically DataRow.

TKey

keySelector 返回的键的类型。The type of the key returned by keySelector.

参数

keySelector
Func<TRow,TKey>

用于从元素中提取键的函数。A function to extract a key from an element.

返回

注解

此方法是使用延迟执行实现的。This method is implemented by using deferred execution. 即时返回值是一个对象,该对象存储执行操作所需的所有信息。The immediate return value is an object that stores all the information that is required to perform the action. 在枚举对象之前,不会执行由此方法表示的查询,方法是:直接调用其 @no__t 0 方法,或者使用视觉C#对象中的 @no__t 或 @no__t Visual Basic 中的。The query represented by this method is not executed until the object is enumerated either by calling its GetEnumerator method directly or by using foreach in Visual C# or For Each in Visual Basic.

另请参阅

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

按指定键和比较器降序排序 EnumerableRowCollection 的行。Sorts the rows of a EnumerableRowCollection in descending order according to the specified key and comparer.

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 中行元素的类型,通常为 DataRowThe type of the row elements in source, typically DataRow.

TKey

keySelector 返回的键的类型。The type of the key returned by keySelector.

参数

keySelector
Func<TRow,TKey>

用于从元素中提取键的函数。A function to extract a key from an element.

comparer
IComparer<TKey>

用于比较键的 IComparer<T>An IComparer<T> to compare keys.

返回

注解

此方法是使用延迟执行实现的。This method is implemented by using deferred execution. 即时返回值是一个对象,该对象存储执行操作所需的所有信息。The immediate return value is an object that stores all the information that is required to perform the action. 在枚举对象之前,不会执行由此方法表示的查询,方法是:直接调用其 @no__t 0 方法,或者使用视觉C#对象中的 @no__t 或 @no__t Visual Basic 中的。The query represented by this method is not executed until the object is enumerated either by calling its GetEnumerator method directly or by using foreach in Visual C# or For Each in Visual Basic.

另请参阅

适用于