I am exploring the HashSet type, but I don\'t understand where it stands in collections.
Can one use it to replace a List
HashSet would be used to remove duplicate elements in an IEnumerable collection. For example,
List duplicatedEnumrableStrings = new List {"abc", "ghjr", "abc", "abc", "yre", "obm", "ghir", "qwrt", "abc", "vyeu"};
HashSet uniqueStrings = new HashSet(duplicatedEnumrableStrings);
after those codes are run, uniqueStrings holds {"abc", "ghjr", "yre", "obm", "qwrt", "vyeu"};