Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

QueryExtensions.SortBy<T> Method (IQueryable<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)

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:
© 2018 Microsoft