# ComponentTypeHash

> Represents a hash of a component type.

## Definition

* **Type:** Struct
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule
* **Implements:** [IEquatable\<ComponentTypeHash>](https://learn.microsoft.com/dotnet/api/system.iequatable-1)

```csharp
public struct ComponentTypeHash : IEquatable<ComponentTypeHash>
```

## Remarks

This struct is mostly intended for internal use in the Entity differ and patcher code. This hash is NOT expected to be stable across versions.

## Fields

| Value                                                                                                | Description                                                |
| ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [Flags](/engine/7000.0/script-reference/unity/entities/componenttypehash/flags.md)                   | Flags for this component type.                             |
| [StableTypeHash](/engine/7000.0/script-reference/unity/entities/componenttypehash/stabletypehash.md) | The hash value. Not expected to be stable across versions. |

## Methods

| Method                                                                                         | Description                                                                                  |
| ---------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [Equals](/engine/7000.0/script-reference/unity/entities/componenttypehash/equals.md)           | Checks if a ComponentTypeHash equals some object which may or may not be a ComponentTypeHash |
| [GetHashCode](/engine/7000.0/script-reference/unity/entities/componenttypehash/gethashcode.md) | Computes a hashcode to support hash-based collections.                                       |

## Operators

| Operator                                                                                         | Description                                             |
| ------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| [operator ==](/engine/7000.0/script-reference/unity/entities/componenttypehash/op-equality.md)   | Checks if two ComponentTypeHash instances are equal     |
| [operator !=](/engine/7000.0/script-reference/unity/entities/componenttypehash/op-inequality.md) | Checks if two ComponentTypeHash instances are not equal |
