{TOC}
| Namespace: | System.Linq |
| Assembly: | System.Core.dll |
| Extends: | IEnumerable<T> |
Back to
Standard Query Operator IndexEditIntroduction
The ThenBy operator orders an ordered sequence according to one or more keys in ascending order.
EditMethod Signatures
// 1 - Order an already ordered sequence in ascending order by one or more keys.
public static IOrderedSequence<TSource> ThenBy<TSource, TKey>(IOrderedSequence<TSource> source, Func<TSource, TKey> keySelector)
// 2 - Order an already ordered sequence in ascending order by one or more keys.
// A custom comparer function can be provided.
public static IOrderedSequence<TSource> ThenBy<TSource, TKey>(IOrderedSequence<TSource> source, Func<TSource, TKey> keySelector, IComparer<TKey> comparer)
EditExceptions
Throws an ArgumentNullException if
source is null.
EditPseudo-code
See
OrderBy Operator. ThenBy sub sorts the sorted sequence.
EditLoop count
See
OrderBy.
EditCode Samples
TODO: Needs code sample.