# QueryEnumerable<T1, T2>

> An enumeration interface for the entities that match an EntityQuery.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule
* **Implements:** [IEnumerable\<ValueTuple\<T, T>>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1), [IEnumerable](https://learn.microsoft.com/dotnet/api/system.collections.ienumerable)

```csharp
public struct QueryEnumerable<T1, T2> : IEnumerable<(T1, T2)>, IEnumerable
```

## Remarks

This feature is primarily intended as a backend implementation for [SystemAPI.Query](/engine/7000.0/script-reference/unity/entities/systemapi/query.md). Application code should prefer to use that interface rather than using this type directly.

## Methods

| Method                                                                                                                    | Description                                                                                                                  |
| ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [GetEnumerator](/engine/7000.0/script-reference/unity/entities/queryenumerable2/getenumerator.md)                         | Returns an enumerator over the entities in this query.                                                                       |
| [WithAbsent](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withabsent.md)                               | Specify all read-only component types that must NOT be present.                                                              |
| [WithAll](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withall.md)                                     | Specify all read-only component types that must be present AND enabled.                                                      |
| [WithAny](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withany.md)                                     | Specify optional read-only component types (which must be enabled).                                                          |
| [WithChangeFilter](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withchangefilter.md)                   | Only select components in chunks in which the specified component might have changed since the last time the system updated. |
| [WithDisabled](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withdisabled.md)                           | Specify all read-only component types that must be present AND disabled.                                                     |
| [WithEntityAccess](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withentityaccess.md)                   | Invoke this method if you wish to retrieve a tuple with an `Entity` parameter, thus giving you direct access to an entity.   |
| [WithNone](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withnone.md)                                   | Specify component types that must be absent, or present and disabled.                                                        |
| [WithOptions](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withoptions.md)                             | Specify your own `EntityQueryOptions`.                                                                                       |
| [WithPresent](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withpresent.md)                             | Specify all read-only component types that must be present, whether enabled or disabled.                                     |
| [WithSharedComponentFilter](/engine/7000.0/script-reference/unity/entities/queryenumerable2/withsharedcomponentfilter.md) | Only select chunks that have a specified value for a shared component.                                                       |
