The .NET framework provides a few handy general-use delegates for common tasks, such as Predicate<T>
and EventHandler<T>
.
Is there a built-in delegate for the equivalent of CompareTo()?
The signature might be something like this:
delegate int Comparison<T>(T x, T y);
This is to implement sorting in such a way that I can provide a lambda expression for the actual sort routine (ListView.ListViewItemSorter, specifically), so any other approaches welcome.