# Equals

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

## Definition

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

## Equals(NodeReference)

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

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

### Parameters

**** (\[NodeReference]\(/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference)): The other [NodeReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference.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 [NodeReference.NodeID](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference/nodeid.md) and refer to the same [NodeReference.Context](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference/context.md) instance. Otherwise, false. |

## Equals(Object)

Indicates whether the current [NodeReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference.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 [NodeReference](/engine/6000.7/script-reference/unity/graphtoolkit/editor/graphvisualization/nodereference.md).

### Returns

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