# GetEnumerator()

> Returns an enumerator over the entities in this query.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

```csharp
public IEnumerator<(T1, T2, T3)> GetEnumerator()
```

### Returns

| Type                                                                                                                  | Description                                                                                                                                                               |
| --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [IEnumerator\<ValueTuple\<T, T, T>>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1) | QueryEnumerableWithEntity, which allows enumerating over all RefRO, RefRW, EnabledRefRO and EnabledRefRW components as well as entities that match the constructed Query. |
