views:

326

answers:

3
+3  Q: 

.NET Generic Set ?

Is there a generic container implementing the 'set' behaviour in .NET?

I know I could just use a Dictionary<T, Object> (and possibly add nulls as values), because its keys act as a set, but I was curious if there's something ready-made.

+11  A: 

HashSet<T> in .NET 3.5

leppie
+2  A: 

I use the Iesi.Collections. namespace that comes with NHibernate (docs here) - maybe worth considering if you are in .NET < 3.5

Jennifer
A: 

PowerCollections has a lot of containers, including a Set.

Adam Tegen