# Equals

> Returns true if the value stored in this reference is equal to the value stored in another reference.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Equals(NativeReference\<T>)

Returns true if the value stored in this reference is equal to the value stored in another reference.

```csharp
[ExcludeFromBurstCompatTesting("Equals boxes because Value does not implement IEquatable<T>")]
public bool Equals(NativeReference<T> other)
```

### Parameters

**** (\[NativeReference\<T>]\(/engine/6000.7/script-reference/unity/collections/nativereference1)): A reference to compare with.

### Returns

| Type                                                          | Description                                                                                   |
| ------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the value stored in this reference is equal to the value stored in another reference. |

## Equals(Object)

Returns true if the value stored in this reference is equal to an object.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed object")]
public override bool Equals(object obj)
```

### Parameters

**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): An object to compare with.

### Returns

| Type                                                          | Description                                                        |
| ------------------------------------------------------------- | ------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True if the value stored in this reference is equal to the object. |

### Remarks

Can only be equal if the object is itself a NativeReference.
