# GetEnumerator()

> Returns an enumerator over the values of this set.

## Definition

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

```csharp
public NativeHashSet<T>.Enumerator GetEnumerator()
```

### Returns

| Type                                                                                         | Description                                |
| -------------------------------------------------------------------------------------------- | ------------------------------------------ |
| [Enumerator](/engine/6000.7/script-reference/unity/collections/nativehashset1/enumerator.md) | An enumerator over the values of this set. |
