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)
 

Specifies a sort order.

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

public:
generic<typename T>
where T : ref class
[ExtensionAttribute]
static IQueryable<T>^ SortBy(
	IQueryable<T>^ source,
	String^ sortExpression
)

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