Results 1 to 2 of 2

Thread: Sort hashtable by key? *resolved, heh*

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2003
    Location
    Seattle, WA
    Posts
    17

    Sort hashtable by key? *resolved, heh*

    Hey anyone know how to sort the items in a hashtable alphabetically by the key? I read somewhere that the hastable has sorting built in but i cant seem to figure out where.

    Mucho gracias.
    ----

    EDIT:
    Hmm, looks like i answered my own question again...declaring the collection as SortedList() instead of HashTable() did the trick.
    Last edited by FireRabbit; Mar 4th, 2003 at 12:51 AM.

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744
    The easiest way to is to use SortedList class instead, which is the same as HashTable but already sorted based on the key.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width