Is there an AddRange equivalent for a HashSet in C#

For HashSet<T>, the name is UnionWith.

This is to indicate the distinct way the HashSet works. You cannot safely Add a set of random elements to it like in Collections, some elements may naturally evaporate.

I think that UnionWith takes its name after “merging with another HashSet“, however, there’s an overload for IEnumerable<T> too.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)