# HashSetExtensions

> Provides extension methods for sets.

## Definition

* **Type:** Class
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

```csharp
public static class HashSetExtensions
```

## Static Methods

| Method                                                                                                | Description                                                                                                       |
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [ExceptWith](/engine/6000.7/script-reference/unity/collections/hashsetextensions/exceptwith.md)       | Removes the values from this set which are also present in another collection.                                    |
| [IntersectWith](/engine/6000.7/script-reference/unity/collections/hashsetextensions/intersectwith.md) | Removes the values from this set which are absent in another collection.                                          |
| [UnionWith](/engine/6000.7/script-reference/unity/collections/hashsetextensions/unionwith.md)         | Adds all distinct values from the other collection to this set. Does not throw if a value is already in this set. |
