C# - an example of comparing C# objects using generic lambda function

less than 1 minute read

1
2
var comparer = Comparer<T>.Default;
Func<T,T,T> minOf = (x, y) => comparer.Compare(x, y) < 0 ? x: y;