# CompareTo

> Returns a number denoting whether this list should be placed before or after another list in a sort.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## CompareTo(FixedList32Bytes\<T>)

Returns a number denoting whether this list should be placed before or after another list in a sort.

```csharp
public int CompareTo(FixedList32Bytes<T> other)
```

### Parameters

**** (\[FixedList32Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist32bytes1)): A list to to compare with.

### Returns

| Type                                                       | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer denoting the respective sort position of the list relative to the other: |

## CompareTo(FixedList64Bytes\<T>)

Returns a number denoting whether this list should be placed before or after another list in a sort.

```csharp
public int CompareTo(FixedList64Bytes<T> other)
```

### Parameters

**** (\[FixedList64Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist64bytes1)): A list to to compare with.

### Returns

| Type                                                       | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer denoting the respective sort position of the list relative to the other: |

## CompareTo(FixedList128Bytes\<T>)

Returns a number denoting whether this list should be placed before or after another list in a sort.

```csharp
public int CompareTo(FixedList128Bytes<T> other)
```

### Parameters

**** (\[FixedList128Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist128bytes1)): A list to to compare with.

### Returns

| Type                                                       | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer denoting the respective sort position of the list relative to the other: |

## CompareTo(FixedList512Bytes\<T>)

Returns a number denoting whether this list should be placed before or after another list in a sort.

```csharp
public int CompareTo(FixedList512Bytes<T> other)
```

### Parameters

**** (\[FixedList512Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist512bytes1)): A list to to compare with.

### Returns

| Type                                                       | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer denoting the respective sort position of the list relative to the other: |

## CompareTo(FixedList4096Bytes\<T>)

Returns a number denoting whether this list should be placed before or after another list in a sort.

```csharp
public int CompareTo(FixedList4096Bytes<T> other)
```

### Parameters

**** (\[FixedList4096Bytes\<T>]\(/engine/6000.7/script-reference/unity/collections/fixedlist4096bytes1)): A list to to compare with.

### Returns

| Type                                                       | Description                                                                         |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer denoting the respective sort position of the list relative to the other: |
