Monday, May 17, 2010


I had my Java head on and was looking for a collection where I could just add items and it would take care of not creating the duplicates and was pleased to find .NET also has a HashSet:

[HostProtectionAttribute(SecurityAction.LinkDemand, MayLeakOnAbort = true)]
public class HashSet<T> : ISerializable, IDeserializationCallback,
ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable

The HashSet class provides high performance set operations. A set is a collection that contains no duplicate elements, and whose elements are in no particular order.

No comments: