OrderByDescending(TRow, TKey) Method (TypedTableBase(TRow), Func(TRow, TKey))

TypedTableBaseExtensions.OrderByDescending(Of TRow, TKey) Method (TypedTableBase(Of TRow), Func(Of TRow, TKey))

.NET Framework (current version)
 

Sorts the rows of a TypedTableBase(Of T) in descending order according to the specified key.

Namespace:   System.Data
Assembly:  System.Data.DataSetExtensions (in System.Data.DataSetExtensions.dll)

<ExtensionAttribute>
Public Shared Function OrderByDescending(Of TRow As DataRow, TKey) (
	source As TypedTableBase(Of TRow),
	keySelector As Func(Of TRow, TKey)
) As OrderedEnumerableRowCollection(Of TRow)

Parameters

source
Type: System.Data.TypedTableBase(Of TRow)

A TypedTableBase(Of T) that contains the DataRow elements to be ordered.

keySelector
Type: System.Func(Of TRow, TKey)

A function to extract a key from an element.

Return Value

Type: System.Data.OrderedEnumerableRowCollection(Of TRow)

An OrderedEnumerableRowCollection(Of 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
Return to top
Show:
© 2016 Microsoft