# CompareTo(ToggleButtonGroupState)

> Compares two ToggleButtonGroupState.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

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

### Parameters

**** (\[ToggleButtonGroupState]\(/engine/6000.0/script-reference/unityengine/uielements/togglebuttongroupstate)): The option set to be compared against.

### Returns

| Type                                                       | Description                                                     |
| ---------------------------------------------------------- | --------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | True if both option sets are the same, otherwise returns false. |
