# GrainReference.Equals(object?)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Runtime/GrainReference.cs#L337)

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

Tests this reference for equality to another object. Two grain references are equal if they both refer to the same grain.

### Parameters

- `obj` (`object?`): The object to test for equality against this reference.

### Returns

`true` if the object is equal to this reference.
