EnumerableRowCollectionExtensions.OrderByDescending Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sorts the rows of a EnumerableRowCollection in descending order.
Overloads
OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>) |
This API supports the product infrastructure and is not intended to be used directly from your code. Sorts the rows of a EnumerableRowCollection in descending order according to the specified key. |
OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>) |
This API supports the product infrastructure and is not intended to be used directly from your code. Sorts the rows of a EnumerableRowCollection in descending order according to the specified key and comparer. |
OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>)
Sorts the rows of a EnumerableRowCollection in descending order according to the specified key.
This API supports the product infrastructure and is not intended to be used directly from your code.
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)
Type Parameters
- TRow
The type of the row elements in source
, typically DataRow.
- TKey
The type of the key returned by keySelector
.
Parameters
An EnumerableRowCollection containing the DataRow elements to be ordered.
- keySelector
- Func<TRow,TKey>
A function to extract a key from an element.
Returns
An OrderedEnumerableRowCollection<TRow> whose elements are sorted by the specified key.
Remarks
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. 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.
See also
- Select<TRow,S>(EnumerableRowCollection<TRow>, Func<TRow,S>)
- ThenByDescending
- OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>)
Applies to
OrderByDescending<TRow,TKey>(EnumerableRowCollection<TRow>, Func<TRow,TKey>, IComparer<TKey>)
Sorts the rows of a EnumerableRowCollection in descending order according to the specified key and comparer.
This API supports the product infrastructure and is not intended to be used directly from your code.
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)
Type Parameters
- TRow
The type of the row elements in source
, typically DataRow.
- TKey
The type of the key returned by keySelector
.
Parameters
An EnumerableRowCollection containing the DataRow elements to be ordered.
- keySelector
- Func<TRow,TKey>
A function to extract a key from an element.
- comparer
- IComparer<TKey>
An IComparer<T> to compare keys.
Returns
An OrderedEnumerableRowCollection<TRow> whose elements are sorted by the specified key and comparer.
Remarks
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. 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.
See also
- Select<TRow,S>(EnumerableRowCollection<TRow>, Func<TRow,S>)
- ThenByDescending
- OrderByDescending<TSource,TKey>(IEnumerable<TSource>, Func<TSource,TKey>, IComparer<TKey>)
Applies to
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par