# Equals

> Checks if a given ToggleButtonGroupState matches with the current one.

## Definition

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

## Equals(ToggleButtonGroupState)

Checks if a given ToggleButtonGroupState matches with the current one.

```csharp
public bool Equals(ToggleButtonGroupState other)
```

### Parameters

**** (\[ToggleButtonGroupState]\(/engine/6000.5/script-reference/unityengine/uielements/togglebuttongroupstate)): A ToggleButtonGroupState to be compared against.

### Returns

| Type                                                          | Description                                                                           |
| ------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if both option has the same data and number of options, otherwise returns false. |

## Equals(Object)

Compares the the current option set with an Object.

```csharp
public override bool Equals(object obj)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): An object to be compared against.

### Returns

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