|
-
Jul 14th, 2004, 08:27 PM
#1
Thread Starter
yay gay
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/
-
Jul 14th, 2004, 11:21 PM
#2
Frenzied Member
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:
For Each de As DictionaryEntry In serverSockets 'serverSockets is a Hashtable
.
.
.
Next
HTH,
Mike
Last edited by Mike Hildner; Jul 14th, 2004 at 11:24 PM.
-
Jul 15th, 2004, 12:08 AM
#3
Sleep mode
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) ..
-
Jul 15th, 2004, 07:06 AM
#4
Thread Starter
yay gay
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|