# GetHashCode()

> Returns a hash code for the current PortReference.

## Definition

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

```csharp
public override int GetHashCode()
```

### Returns

| Type                                                       | Description                                                                                                                                                                                                                                                                                                            |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | A hash code derived from the [PortReference.PortID](/engine/6000.6/script-reference/unity/graphtoolkit/editor/graphvisualization/portreference/portid.md) and [PortReference.Context](/engine/6000.6/script-reference/unity/graphtoolkit/editor/graphvisualization/portreference/context.md) of the current reference. |
