TypedTableBaseExtensions.OrderByDescending Method
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 TypedTableBase<T> in descending order.
OrderByDescending<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>) |
Sorts the rows of a TypedTableBase<T> in descending order according to the specified key. |
OrderByDescending<TRow,TKey>(TypedTableBase<TRow>, Func<TRow,TKey>, IComparer<TKey>) |
Sorts the rows of a TypedTableBase<T> in descending order according to the specified key and comparer. |
- Source:
- TypedTableBaseExtensions.cs
- Source:
- TypedTableBaseExtensions.cs
- Source:
- TypedTableBaseExtensions.cs
Sorts the rows of a TypedTableBase<T> in descending order according to the specified key.
public:
generic <typename TRow, typename TKey>
where TRow : System::Data::DataRow[System::Runtime::CompilerServices::Extension]
static System::Data::OrderedEnumerableRowCollection<TRow> ^ OrderByDescending(System::Data::TypedTableBase<TRow> ^ source, Func<TRow, TKey> ^ keySelector);
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<TRow,TKey>(this System.Data.TypedTableBase<TRow> source, Func<TRow,TKey> keySelector) where TRow : System.Data.DataRow;
static member OrderByDescending : 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 OrderByDescending(Of TRow As DataRow, TKey As DataRow) (source As TypedTableBase(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
- source
- TypedTableBase<TRow>
A TypedTableBase<T> that contains 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.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
- Source:
- TypedTableBaseExtensions.cs
- Source:
- TypedTableBaseExtensions.cs
- Source:
- TypedTableBaseExtensions.cs
Sorts the rows of a TypedTableBase<T> in descending order according to the specified key and comparer.
public:
generic <typename TRow, typename TKey>
where TRow : System::Data::DataRow[System::Runtime::CompilerServices::Extension]
static System::Data::OrderedEnumerableRowCollection<TRow> ^ OrderByDescending(System::Data::TypedTableBase<TRow> ^ source, Func<TRow, TKey> ^ keySelector, System::Collections::Generic::IComparer<TKey> ^ comparer);
public static System.Data.OrderedEnumerableRowCollection<TRow> OrderByDescending<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 OrderByDescending : 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 OrderByDescending(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)
Type Parameters
- TRow
The type of the row elements in source
, typically DataRow.
- TKey
The type of the key returned by keySelector
.
Parameters
- source
- TypedTableBase<TRow>
A TypedTableBase<T> that contains 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.
Applies to
.NET 10 and other versions
Product | Versions |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided), 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: