# GetHashCode()

> Computes a hash code for this reference.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Localization](/engine/6000.7/script-reference/unity/localization.md)
* **Assembly:** UnityEngine.LocalizationRuntimeModule

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

### Returns

| Type                                                       | Description                                                                       |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | An integer hash code derived from the part of the reference that resolution uses. |

### Remarks

Consistent with [TableEntryReference.Equals](/engine/6000.7/script-reference/unity/localization/tableentryreference/equals.md): references that compare equal produce the same hash code. Safe to use as a dictionary key.

Use an entry reference as a dictionary key.

### Examples

```csharp
using System.Collections.Generic;
using Unity.Localization;

namespace Unity.Localization.Samples
{
    public class TableEntryReferenceHashCodeExample
    {
        public void Run(TableEntryReference entryReference)
        {
            var counts = new Dictionary<TableEntryReference, int>();
            counts[entryReference] = counts.GetValueOrDefault(entryReference) + 1;
        }
    }
}
```
