Results 1 to 5 of 5

Thread: best way to store paired values:

  1. #1

    Thread Starter
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375

    Question best way to store paired values:

    Hi, I have a list of paired values that are to be retrieved from a database and returned by a function. There will be no set number of pairs returned.

    A list of pairs may look like the following;

    "http://www.myurl.com" "My homepage"
    "http://www.microsofy.com" "Microsofts homepage"

    What would be the best way to return this information from a function? I thought of using a 2d array but I would rather just use a collection and a structure so I can reference the collection via a key...

    Recomendations welcome
    Cheers
    MarkusJ

  2. #2
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    Why don't you just dump it into a dataset or a datatable?

    Jeremy

  3. #3

    Thread Starter
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Yep, there's another way I want to try and make it as fast as possible..

  4. #4
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    A hashtable would be good, it is made to store a name/value pair.

  5. #5

    Thread Starter
    Hyperactive Member MarkusJ_NZ's Avatar
    Join Date
    Jun 2001
    Posts
    375
    Cool, that sounds exactly what I am after
    Cheers

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