I have to write something in vbscript that need to use a unique set. I am looking for something akin to Java's HashSet, is this already in vbscript or do I have to write my own?
+5
A:
It's not identical, but VBScript has a Dictionary object which behaves like Java's Map or Hashtable.
You can use this almost like a HashSet, by just looking up the item as a key in the dictionary and finding if there is any value there. When you want to put something into the set, simply set its value to 1 or anything else.
Leigh Caldwell
2008-10-08 00:06:21
I google vbs HashSet and found only reference to Dictionary. I was hoping for something more straightforward, but this will do the trick.
greencrab
2008-10-08 05:51:38
Greencrab, don't forget then to mark this answer as accepted
AnthonyWJones
2008-10-08 11:34:38