I have a property that returns a HashTable
. I would like to sort it without refactoring my property. Please note: I do not want to return another type.
Of course hash tables can be sorted, but you need to first define what it means to sort a hash table. (Therein lies the issue)
Once you have done that, however, you've invariably removed all the advantages that a hashtable can give you, and you might as well use a sorted array (with binary searching), or use a red-black tree instead.