# CompareTo(SearchResult)

> Compares Search Results using their index values.

## Definition

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

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

### Parameters

**** (\[SearchResult]\(/engine/6000.5/script-reference/unityeditor/search/searchresult)): Another SearchResult to compare.

### Returns

| Type                                                       | Description                                             |
| ---------------------------------------------------------- | ------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | Returns true if both SearchResults have the same index. |
