M Marina Jul 15, 2004 #2 By it's definition, a hashtable is not a sorted collection. Perhaps you should use another collection type.
By it's definition, a hashtable is not a sorted collection. Perhaps you should use another collection type.
J John Saunders Jul 15, 2004 #3 RSB said: How do i sort a Hash Table.. Click to expand... You could add the HashTable to an empty ArrayList, then sort the ArrayList: public ICollection SortedHashTable(HashTable ht) { ArrayList sorter = new ArrayList(); sorter.AddRange(ht); sorter.Sort(); return sorter; }
RSB said: How do i sort a Hash Table.. Click to expand... You could add the HashTable to an empty ArrayList, then sort the ArrayList: public ICollection SortedHashTable(HashTable ht) { ArrayList sorter = new ArrayList(); sorter.AddRange(ht); sorter.Sort(); return sorter; }