MoreEnumerableThenByT, TKey(IOrderedEnumerableT, FuncT, TKey, IComparerTKey, OrderByDirection) Method
Performs a subsequent ordering of elements in a sequence in a particular direction (ascending, descending) according to a key
Namespace: MoreLinqAssembly: MoreLinq (in MoreLinq.dll) Version: 3.4.0+b99a6a8cc504caf2d48372fe54a2f8116c59cd0c
public static IOrderedEnumerable<T> ThenBy<T, TKey>(
this IOrderedEnumerable<T> source,
Func<T, TKey> keySelector,
IComparer<TKey>? comparer,
OrderByDirection direction
)
<ExtensionAttribute>
Public Shared Function ThenBy(Of T, TKey) (
source As IOrderedEnumerable(Of T),
keySelector As Func(Of T, TKey),
comparer As IComparer(Of TKey),
direction As OrderByDirection
) As IOrderedEnumerable(Of T)
public:
[ExtensionAttribute]
generic<typename T, typename TKey>
static IOrderedEnumerable<T>^ ThenBy(
IOrderedEnumerable<T>^ source,
Func<T, TKey>^ keySelector,
IComparer<TKey>^ comparer,
OrderByDirection direction
)
[<ExtensionAttribute>]
static member ThenBy :
source : IOrderedEnumerable<'T> *
keySelector : Func<'T, 'TKey> *
comparer : IComparer<'TKey> *
direction : OrderByDirection -> IOrderedEnumerable<'T>
- source IOrderedEnumerableT
- The sequence to order
- keySelector FuncT, TKey
- A key selector function
- comparer IComparerTKey
- A comparer used to define the semantics of element comparison
- direction OrderByDirection
- A direction in which to order the elements (ascending, descending)
- T
- The type of the elements in the source sequence
- TKey
- The type of the key used to order elements
IOrderedEnumerableTAn ordered copy of the source sequenceIn Visual Basic and C#, you can call this method as an instance method on any object of type
IOrderedEnumerableT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).