[API Proposal]: Sort() on OrderedDictionary #115127
Labels
api-suggestion
Early API idea and discussion, it is NOT ready for implementation
area-System.Collections
untriaged
New issue has not been triaged by the area owner
Background and motivation
We've had an OrderedDictionary<TK, TV> for a long time; and up comes a stock OrderedDictionary in .NET 9. Kind of an ugly breaking change but there's things I can do about that.
I'd like to replace my junky implementation with the stock implementation; however in order to do that I would need a method added to the stock OrderedDictionary: Sort()
API Proposal
API Usage
Alternative Designs
Add the Swap(int, int) method and I can provide the sort. Without the Swap method an external sort will perform horribly and I must keep using my own junky implementation.
Risks
Potential source breaking change if somebody added a Sort() method into a derived class.
The text was updated successfully, but these errors were encountered: