# LegacyGrainId.GetHashCode

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.legacygrainid/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.legacygrainid/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/Legacy/LegacyGrainId.cs#L269)

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

Serves as the default hash function.

### Returns

A hash code for the current object.
