# GetEnumerator()

> Returns this as an iterator that allows you to iterate over all positions within the BoundsInt.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public BoundsInt.PositionEnumerator GetEnumerator()
```

### Returns

| Type                                                                                              | Description                                                                                                       |
| ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| [PositionEnumerator](/engine/6000.7/script-reference/unityengine/boundsint/positionenumerator.md) | This [BoundsInt.PositionEnumerator](/engine/6000.7/script-reference/unityengine/boundsint/positionenumerator.md). |
