Deprecated: Function set_magic_quotes_runtime() is deprecated in /nfs/c01/h08/mnt/2939/domains/cidamon.com/html/blog/textpattern/lib/txplib_db.php on line 14
Cidamon: Blog: HashSet in dot net 3.5
HashSet in dot net 3.5
06 November, 2010

HashSet has been introduced in framework 3.5. It inherits the ICollection interface. HashSet cannot be accessed through indices, only through an enumerator.
HasSet is modeled upon mathematical set. It has methods such as Union, Intersection, IsSubsetOf, IsSupersetOf.
Add method of HashSet is boolean unlike List. HashSet allows only unique values. So, if the value already exists then “Add” method returns false.
So, if the list requires to contain unique values then it is better and faster to use HashSet instead of List.

---

Commenting is closed for this article.