# CompareTo(TypeIndex)

> Compare this TypeIndex against a given one

## Definition

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

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

### Parameters

**** (\[TypeIndex]\(/engine/7000.0/script-reference/unity/entities/typeindex)): The other TypeIndex to compare to

### Returns

| Type                                                       | Description                         |
| ---------------------------------------------------------- | ----------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Difference between TypeIndex values |
