SortBy(T) Method
Collapse the table of content
Expand the table of content

QueryExtensions.SortBy<T> Method (IQueryable<T>, String)

.NET Framework (current version)
 

Specifies a sort order.

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

public static IQueryable<T> SortBy<T>(
	this IQueryable<T> source,
	string sortExpression
)
where T : class

Parameters

source
Type: System.Linq.IQueryable<T>

The object to sort.

sortExpression
Type: System.String

The sort expression.

Return Value

Type: System.Linq.IQueryable<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:
© 2016 Microsoft