Ejemplo n.º 1
0
 /// <summary>
 /// Creates a comparer that uses the specified <see cref="Comparison{T}"/> delegate to compare objects.
 /// </summary>
 /// <param name="comparison">The <see cref="Comparison{T}"/> delegate used to compare objects.</param>
 /// <typeparam name="T">The type of the objects to compare.</typeparam>
 /// <returns>A comparer that uses the specified <see cref="Comparison{T}"/> delegate to compare objects.</returns>
 public static IComparer <T> FromComparison <T>([NotNull] Comparison <T> comparison)
 {
     comparison.CheckArgumentNull(nameof(comparison));
     return(new DelegateComparer <T>(comparison));
 }