# CompareTo(PropertyDatabaseRecordKey)

> Compares the record key to another record key.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.3/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

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

### Parameters

**** (\[PropertyDatabaseRecordKey]\(/engine/6000.3/script-reference/unityeditor/search/propertydatabaserecordkey)): A record key to compare against.

### Returns

| Type                                                       | Description                                                                                                                                |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer representing the equality result. -1 if the current key is smaller, 0 if it is equal and 1 if it is greater than the other key. |
