TypedTableBaseExtensions::OrderByDescending<TRow, TKey> Method (TypedTableBase<TRow>^, Func<TRow, TKey>^)
.NET Framework (current version)
Sorts the rows of a TypedTableBase<T> in descending order according to the specified key.
Assembly: System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)
public: generic<typename TRow, typename TKey> where TRow : DataRow [ExtensionAttribute] static OrderedEnumerableRowCollection<TRow>^ OrderByDescending( TypedTableBase<TRow>^ source, Func<TRow, TKey>^ keySelector )
Parameters
- source
-
Type:
System.Data::TypedTableBase<TRow>^
A TypedTableBase<T> that contains the DataRow elements to be ordered.
- keySelector
-
Type:
System::Func<TRow, TKey>^
A function to extract a key from an element.
Return Value
Type: System.Data::OrderedEnumerableRowCollection<TRow>^An OrderedEnumerableRowCollection<TRow> whose elements are sorted by the specified key.
Type Parameters
- TRow
The type of the row elements in source, typically DataRow.
- TKey
The type of the key returned by keySelector.
.NET Framework
Available since 3.5
Available since 3.5
Show: