Since .net 3.5, there is the HashSet<T>
which implements a Set. Not sure if it's totally equal to C++'s set though.
Until .NET3.5, no (don't ask me why it took them so long to get these fundamentals added. (There's still no heap class, afaik. The .NET collection classes are surprisingly lackluster).
In 3.5, you have HashSet<T>
. It's more like the TR1 unordered_set
than std::set
though, in that it's unordered, where std::set
uses a tree structure internally.
Of course there are several third-party libraries offering to fix these shortcomings.
I've looked at C5 (as suggested by Pratik) before, but never used it. But it seems to be pretty good quality, and has a Set class.
I can suggest The C5 Generic Collection Library that has a hash set collection class among many others.
The answer to your question is YES. Check out the Jeff Richter's amazing Power Collections library for some of the most commonly used STL equivalent collection types for .NET. On an unrelated note he also has a Power Threading library