# GetEnumerator()

> Returns an enumerator over the items of this hash set.

## Definition

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

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

### Returns

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