QueryExtensions.SortBy<T>(IQueryable<T>, String) 方法

定义

指定排序顺序。Specifies a sort order.

public:
generic <typename T>
 where T : class[System::Runtime::CompilerServices::Extension]
 static System::Linq::IQueryable<T> ^ SortBy(System::Linq::IQueryable<T> ^ source, System::String ^ sortExpression);
public static System.Linq.IQueryable<T> SortBy<T> (this System.Linq.IQueryable<T> source, string sortExpression) where T : class;
static member SortBy : System.Linq.IQueryable<'T (requires 'T : null)> * string -> System.Linq.IQueryable<'T (requires 'T : null)> (requires 'T : null)
<Extension()>
Public Function SortBy(Of T As Class) (source As IQueryable(Of T), sortExpression As String) As IQueryable(Of T)

类型参数

T

对象的泛型类型。The generic type of the object.

参数

source
IQueryable<T>

要排序的对象。The object to sort.

sortExpression
String

排序表达式。The sort expression.

返回

source 对象的排序的版本。The sorted version of the source object.

适用于