# GetEnumerator()

> Returns an enumerator over the items of this container.

## Definition

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

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

### Returns

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