System.Collections.ArrayList sorting improvements  
Author Message
alamandra - MCP





PostPosted: .NET Base Class Library, System.Collections.ArrayList sorting improvements Top

Hi!

Short suggestion about this class. It's got several Sort methods implemented. But none of them expects System.Windows.Forms.SortOrder parameter, what would be great.

(PS.I know how to implement it.)

Cheers,
Dawid Ireno.



.NET Development29  
 
 
Sean Hederman





PostPosted: .NET Base Class Library, System.Collections.ArrayList sorting improvements Top

Well, I'd think you could accomplish a reverse sort quite easily by passing in an IComparer that returns the "wrong" results, -1 for 1, and vice versa.



 
 
alamandra - MCP





PostPosted: .NET Base Class Library, System.Collections.ArrayList sorting improvements Top

Of course - serving an IComparer implementation would work fine. But that's not the point, is it In .NET Framework there is a lot to do. For example .NET's 1.1 string (the very very basic class!) had no Contains(string) method. Version 2.0 has got it, while it was natural. It was only a matter of time

Cheers, David