# CompareTo(Hash128)

> Compares this hash's value to another hash's, and returns an integer that is negative if this hash's value is less, 0 if the same, or positive if more than the other hash.

## Definition

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

```csharp
public int CompareTo(Hash128 other)
```

### Parameters

**** (\[Hash128]\(/engine/7000.0/script-reference/unity/entities/hash128)): The hash to compare to this hash.

### Returns

| Type                                                       | Description                                                                                                                                                                            |
| ---------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | a negative number, if this hash's value is less than the other hash's. zero, if the hash's values are the same. a positive number, if this hash's value is more than the other hash's. |
