# operator ==(Hierarchy, Hierarchy)

> Compares instances of the Hierarchy struct for equality.

## Definition

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

```csharp
public static bool operator ==(VisualElement.Hierarchy x, VisualElement.Hierarchy y)
```

### Parameters

**** (\[Hierarchy]\(/engine/6000.5/script-reference/unityengine/uielements/visualelement/hierarchy)): The left operand of the comparison.**** (\[Hierarchy]\(/engine/6000.5/script-reference/unityengine/uielements/visualelement/hierarchy)): The right operand of the comparison.

### Returns

| Type                                                          | Description                                                                   |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the two instances refer to the same element, false otherwise. |
