# Equals

> Checks if this component type has the same ComponentType.TypeIndex and ComponentType.AccessModeType as the other component type.

## Definition

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

## Equals(ComponentType)

Checks if this component type has the same [ComponentType.TypeIndex](/engine/7000.0/script-reference/unity/entities/componenttype/typeindex.md) and [ComponentType.AccessModeType](/engine/7000.0/script-reference/unity/entities/componenttype/accessmodetype.md) as the other component type.

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

### Parameters

**** (\[ComponentType]\(/engine/7000.0/script-reference/unity/entities/componenttype)): The other component type to compare to

### Returns

| Type                                                          | Description                                                                                                                                                                                                                                          |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the [ComponentType.TypeIndex](/engine/7000.0/script-reference/unity/entities/componenttype/typeindex.md) and [ComponentType.AccessModeType](/engine/7000.0/script-reference/unity/entities/componenttype/accessmodetype.md)of both are equal |

## Equals(Object)

Checks to see if an object is equal to this component type.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed object")]
public override bool Equals(object obj)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to check

### Returns

| Type                                                          | Description                                                                                                                                        |
| ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the object is a [ComponentType](/engine/7000.0/script-reference/unity/entities/componenttype.md) and the object equals this component type |
