/// <summary> /// Creates a comparer that will sort elements in descending order based on the values returned by the provided /// selector. The values will be compared using the default comparer for the return type of the selector. /// </summary> /// <typeparam name="TValue">The value type.</typeparam> /// <param name="selector"> /// A function supplying the values for the comparer. /// </param> /// <returns>A comparer.</returns> public static IComparer <T> OrderByDescending <TValue>(Func <T, TValue> selector) => ComparerChainingExtensions.ThenByDescending(null, selector);