Comparing HashSets Example

This is a simple example of showing how you can see if two collections, especially hashsets, are equal in their elements.

Continue reading


Hash Set Operators

Have you ever had the need to join elements from one collection to another? Or only show the unique elements from one collection to another? I’ve seen some creative ways of doing it. However using the built in UnionWith, SymmectricExceptWith, and ExceptWith methods can do these things.

Continue reading

Hash Set Examples

Hash sets are one of the more unique collection types in the .NET framework. They work differently than a normal collection class such as a List. One of the main advantage of using a hashet is to avoid having duplicate elements in the collection. It’s internal use of standard Add, Remove, and Contains methods makes this one of the faster collection types to work with. Click more to see some examples I’ve provided.

Continue reading