C# – “Set” data structure in .Net

c++data-structuresset

Ideally, I'm looking for a templated logical Set class. It would have all of the standard set operations such as Union, Intersection, Etc., and collapse duplicated items.

I ended up creating my own set class based on the C# Dictionary<>- just using the Keys.

Best Solution

HashSet<T> is about the closest you'll get, I think.