Results 1 to 4 of 4

Thread: Is there any class around that would work like a hashtable and a arraylist?

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    Is there any class around that would work like a hashtable and a arraylist?

    I need something like an hashtable that let me get objects by its name but that also lets me loop through them. Does it even exist? Thanks
    \m/\m/

  2. #2
    Frenzied Member Mike Hildner's Avatar
    Join Date
    Jul 2002
    Location
    Des Moines, NM
    Posts
    1,690
    Hope I understand you correctly, PT Exorcist. Can't you "loop through" the Hashtable with a For Each...? Hashtable implements ICollection.

    I have some code that looks like this:
    VB Code:
    1. For Each de As DictionaryEntry In serverSockets 'serverSockets is a Hashtable
    2. .
    3. .
    4. .
    5. Next

    HTH,
    Mike
    Last edited by Mike Hildner; Jul 14th, 2004 at 11:24 PM.

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    If you're not happy with hashtable then why don't you just create your own custom class and make it iteratable .

    edit : or you can wait until MS release VS.NET 2005 , where custom classes are iteratable easily (just couple of steps, as I heard) ..

  4. #4

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Well I was asking if it *already* exists. Of course I can create one of my own but that would be wasting my time if it already exists.

    But I didnt remember I could use a foreach loop
    Last edited by PT Exorcist; Jul 15th, 2004 at 07:10 AM.
    \m/\m/

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