是否有一个集合,就像没有值的字典? [英] Is there a Collection that works like a Dictionary without the values?

查看:134
本文介绍了是否有一个集合,就像没有值的字典?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要的功能就像一个字典/哈希表在一定意义上,它仅包含一个给定对象的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的

这篇关于是否有一个集合,就像没有值的字典?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆