# QueryEnumerableWithEntity<T1, T2, T3, T4, T5>

> An enumeration interface for the entities that match an EntityQuery. This variant includes access the the entity and its component values.

## Definition

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

```csharp
public readonly struct QueryEnumerableWithEntity<T1, T2, T3, T4, T5> : IEnumerable<(T1, T2, T3, T4, T5, Entity)>, 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.

## Fields

| Value                                                                                       | Description                               |
| ------------------------------------------------------------------------------------------- | ----------------------------------------- |
| [Item1](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item1.md) | A component value for the current entity. |
| [Item2](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item2.md) | A component value for the current entity. |
| [Item3](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item3.md) | A component value for the current entity. |
| [Item4](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item4.md) | A component value for the current entity. |
| [Item5](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item5.md) | A component value for the current entity. |
| [Item6](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/item6.md) | The current entity.                       |

## Constructors

| Constructor                                                                                                                                                  | Description             |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------- |
| [QueryEnumerableWithEntity\`5(\`0,\`1,\`2,\`3,\`4,Unity.Entities.Entity)](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/ctor.md) | Construct a new object. |

## Methods

| Method                                                                                                                              | Description                                                                                                                  |
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| [Deconstruct](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/deconstruct.md)                             | Clean up an existing object.                                                                                                 |
| [GetEnumerator](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/getenumerator.md)                         | Returns an enumerator over the entities in this query.                                                                       |
| [WithAll](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withall.md)                                     | Specify all read-only component types that must be present.                                                                  |
| [WithAny](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withany.md)                                     | Specify optional read-only component types.                                                                                  |
| [WithChangeFilter](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withchangefilter.md)                   | Only select components in chunks in which the specified component might have changed since the last time the system updated. |
| [WithNone](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withnone.md)                                   | Specify component types that must be absent.                                                                                 |
| [WithOptions](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withoptions.md)                             | Specify your own `EntityQueryOptions`.                                                                                       |
| [WithSharedComponentFilter](/engine/7000.0/script-reference/unity/entities/queryenumerablewithentity5/withsharedcomponentfilter.md) | Only select chunks that have a specified value for a shared component.                                                       |
