# Equals

> Indicates whether the current WireReference is equal to another WireReference.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor.GraphVisualization](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization.md)
* **Assembly:** UnityEditor

## Equals(WireReference)

Indicates whether the current [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md) is equal to another [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md).

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

### Parameters

**** (\[WireReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference)): The other [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md) to compare with the current instance.

### Returns

| Type                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if both references share the same [WireReference.OutputPortID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference/outputportid.md), [WireReference.InputPortID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference/inputportid.md), and refer to the same [WireReference.Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference/context.md) instance; otherwise, false. |

## Equals(Object)

Indicates whether the current [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md) is equal to another object.

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

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): The object to compare with the current [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md).

### Returns

| Type                                                          | Description                                                                                                                                                                        |
| ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | true if `obj` is a [WireReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/wirereference.md) equal to the current instance; otherwise, false. |
