Performs a subsequent ordering of the elements in that sequence in descending order, according to a key.

// "mango", "grape", "apple", // "orange", "banana", // "passionfruit", // "raspberry", "blueberry" Enumerable.create("grape", "passionfruit", "banana", "mango", "orange", "raspberry", "apple", "blueberry") .orderBy('x => x.length') .thenByDescending('x => x');

With comparer

// "apple", "grape", "mango", // "banana", "orange", // "blueberry", "raspberry", // "passionfruit" Enumerable.create("grape", "passionfruit", "banana", "mango", "orange", "raspberry", "apple", "blueberry") .orderBy('x => x.length') .thenByDescending('x => x', function(x, y) { if (x < y) return 1; if (x > y) return -1; return 0; });