# Equals

> Checks if another ComponentTypeHash instance is equal to this one

## Definition

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

## Equals(ComponentTypeHash)

Checks if another ComponentTypeHash instance is equal to this one

```csharp
public bool Equals(ComponentTypeHash other)
```

### Parameters

**** (\[ComponentTypeHash]\(/engine/7000.0/script-reference/unity/entities/componenttypehash)): A ComponentTypeHash to compare with

### Returns

| Type                                                          | Description                                        |
| ------------------------------------------------------------- | -------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if `other` contains the hash value and flags. |

## Equals(Object)

Checks if a ComponentTypeHash equals some object which may or may not be a ComponentTypeHash

```csharp
public override bool Equals(object obj)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): An object to compare with

### Returns

| Type                                                          | Description                                                                       |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if `obj` is a ComponentTypeHash, and contains the same hash value and flags. |
