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:
[SerializableAttribute]
[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.
http://msdn.microsoft.com/en-us/library/bb359438.aspx
No comments:
Post a Comment