Is there an existing delegate in the .NET Framework for comparison?
        Posted  
        
            by Neil Barnwell
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Neil Barnwell
        
        
        
        Published on 2009-01-22T19:42:39Z
        Indexed on 
            2010/06/14
            13:52 UTC
        
        
        Read the original article
        Hit count: 236
        
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.
© Stack Overflow or respective owner