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

定義

指定排序順序。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> IQueryable<T> IQueryable<T> IQueryable<T>

要排序的物件。The object to sort.

sortExpression
String String String String

排序運算式。The sort expression.

傳回

source 物件的已排序的版本。The sorted version of the source object.

適用於