An object for Set

  • Thread starter Thread starter Plausible Indirection
  • Start date Start date
P

Plausible Indirection

I'm looking for some object built into the .Net framework that
implements the concept of sets. The required principle
characteristics are that the elements are unordered and that
duplicates are not allowed. It would be nice if it could be
contrained on some given type, but that type could be as generic as
object.

Is there such a thing?

Thanks,
Chris
 
Collections can do this job, however you would need to come up with your own
criteria for determining what constitutes a duplicate.
 
Plausible said:
I'm looking for some object built into the .Net framework that
implements the concept of sets. The required principle
characteristics are that the elements are unordered and that
duplicates are not allowed. It would be nice if it could be
contrained on some given type, but that type could be as generic as
object.

Is there such a thing?

Not built into the .NET framework but
http://www.codeproject.com/csharp/Sets.asp works well.
 
Collections are ordered.

Scott M. said:
Collections can do this job, however you would need to come up with your own
criteria for determining what constitutes a duplicate.
 
Back
Top