# Compare<T>(ToggleButtonGroupState, T)

> Compares two ToggleButtonGroupState of flag enum types.

## Definition

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

```csharp
public static bool Compare<T>(ToggleButtonGroupState options, T value) where T : Enum
```

### Parameters

**** (\[ToggleButtonGroupState]\(/engine/6000.6/script-reference/unityengine/uielements/togglebuttongroupstate)): The ToggleButtonGroupState to be compared with.**** (T): The value of a given flag enum.

### Returns

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