# CompareTo(SystemHandle)

> Implements IComparable interface for usage in generic sorted containers

## Definition

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

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

### Parameters

**** (\[SystemHandle]\(/engine/7000.0/script-reference/unity/entities/systemhandle)): The SystemHandle being compared against

### Returns

| Type                                                       | Description                                                        |
| ---------------------------------------------------------- | ------------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Value representing relative order compared to another SystemHandle |
