Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须在需要使用唯一集合的 vbscript 中编写一些东西。我正在寻找类似于 Java 的 HashSet 的东西,这已经在 vbscript 中还是我必须自己编写?
它不完全相同,但 VBScript 有一个 Dictionary 对象,其行为类似于 Java 的 Map 或 Hashtable。
您几乎可以像使用 HashSet 一样使用它,只需在字典中查找作为键的项目并查找那里是否有任何值。当您想将某些东西放入集合中时,只需将其值设置为 1 或其他任何值。