# CompareQuery(in EntityQueryBuilder)

> Compares a query description to the description defining this EntityQuery.

## Definition

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

## CompareQuery(EntityQueryBuilder)

```csharp
public bool CompareQuery(in EntityQueryBuilder queryDesc)
```

### Parameters

**** (\[EntityQueryBuilder]\(/engine/7000.0/script-reference/unity/entities/entityquerybuilder)): The query description to compare.

### Returns

| Type                                                          | Description                                                                                                                |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True, if the query description contains the same components with the same read/write access modifiers as this EntityQuery. |

### Remarks

The `All`, `Any`, and `None` components in the query description are compared to the corresponding list in this EntityQuery.
