是否有一个集合,就像没有值的字典?就像、字典、有一个

2023-09-04 01:12:00 作者:Ferry

我需要的功能就像一个字典/哈希表在一定意义上,它仅包含一个给定对象的1个实例在任何时候的集合。泛型类是preferable,但我会采取什么我可以得到的。这是否收集地方住的框架?

I need a collection that works just like a Dictionary/Hashtable in a sense that it will only contain 1 instance of a given object at any time. A generic class would be preferable, but I'll take what I can get. Does this collection live somewhere in the framework?

推荐答案

的HashSet< T> System.Core.dll的