QueryExtensions.SortBy(Of T) Method (IQueryable(Of T), String)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies a sort order.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

<ExtensionAttribute>
Public Shared Function SortBy(Of T As Class) (
	source As IQueryable(Of T),
	sortExpression As String
) As IQueryable(Of T)

Parameters

source
Type: System.Linq.IQueryable(Of T)

The object to sort.

sortExpression
Type: System.String

The sort expression.

Return Value

Type: System.Linq.IQueryable(Of T)

The sorted version of the source object.

Type Parameters

T

The generic type of the object.

.NET Framework
Available since 4.5
Return to top
Show: