Click or drag to resize

MoreEnumerableThenByT, TKey Method (IOrderedEnumerableT, FuncT, TKey, OrderByDirection)

Performs a subsequent ordering of elements in a sequence in a particular direction (ascending, descending) according to a key

Namespace:  MoreLinq
Assembly:  MoreLinq (in MoreLinq.dll) Version: 3.3.1+b77df70598ab84c28cd43dcf74594024b6d575e1
Syntax
public static IOrderedEnumerable<T> ThenBy<T, TKey>(
	this IOrderedEnumerable<T> source,
	Func<T, TKey> keySelector,
	OrderByDirection direction
)

Parameters

source
Type: System.LinqIOrderedEnumerableT
The sequence to order
keySelector
Type: SystemFuncT, TKey
A key selector function
direction
Type: MoreLinqOrderByDirection
A direction in which to order the elements (ascending, descending)

Type Parameters

T
The type of the elements in the source sequence
TKey
The type of the key used to order elements

Return Value

Type: IOrderedEnumerableT
An ordered copy of the source sequence

Usage Note

In 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).
See Also