HashSet in csharp

J

Jeroen Mostert

puzzlecracker said:
is there a comparable class to HashSet (java's) in csharp?
There is in .NET 3.5, and it's called... Well, I won't spoil it.

http://msdn.microsoft.com/library/bb359438

Before that, any of the alternatives mentioned by Peter would do. I've
usually used Dictionaries with a dummy value, or Dictionaries where the keys
were the values, depending on what was more convenient. This is not as
efficient as a specialized collection, but it suffices in most cases.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top