# Immutable&lt;T&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/)

## Equals(Immutable&lt;T&gt;) {#equals-orleans-concurrency-immutable-t-a51a52e2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/methods/equals-orleans-concurrency-immutable-t-a51a52e2/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Core.Abstractions/Core/Immutable.cs#L32)

```csharp
public bool Equals(Immutable<T> other)
```

Indicates whether the current object is equal to another object of the same type.

### Parameters

- `other` (`Immutable<T>`): An object to compare with this object.

### Returns

`true` if the current object is equal to the `other` parameter; otherwise, `false`.

## Equals(object?) {#equals-object-nullable-74cf5427}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/methods/equals-object-nullable-74cf5427/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Core.Abstractions/Core/Immutable.cs#L35)

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

Indicates whether this instance and a specified object are equal.

### Parameters

- `obj` (`object?`): The object to compare with the current instance.

### Returns

`true` if `obj` and this instance are the same type and represent the same value; otherwise, `false`.

## GetHashCode {#gethashcode-dd5a49c1}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/methods/gethashcode-dd5a49c1/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Core.Abstractions/Core/Immutable.cs#L38)

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

Returns the hash code for this instance.

### Returns

A 32-bit signed integer that is the hash code for this instance.

## operator ==(Immutable&lt;T&gt;, Immutable&lt;T&gt;) {#op-equality-orleans-concurrency-immutable-t-orleans-concurrency-immutable-t-2aa3d426}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/methods/op-equality-orleans-concurrency-immutable-t-orleans-concurrency-immutable-t-2aa3d426/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Core.Abstractions/Core/Immutable.cs#L43)

```csharp
public static bool operator ==(Immutable<T> left, Immutable<T> right)
```

Determines whether two immutable wrappers contain equal values.

### Parameters

- `left` (`Immutable<T>`)
- `right` (`Immutable<T>`)

## operator !=(Immutable&lt;T&gt;, Immutable&lt;T&gt;) {#op-inequality-orleans-concurrency-immutable-t-orleans-concurrency-immutable-t-d5af0dca}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.concurrency.immutable-1/methods/op-inequality-orleans-concurrency-immutable-t-orleans-concurrency-immutable-t-d5af0dca/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Core.Abstractions/Core/Immutable.cs#L48)

```csharp
public static bool operator !=(Immutable<T> left, Immutable<T> right)
```

Determines whether two immutable wrappers contain unequal values.

### Parameters

- `left` (`Immutable<T>`)
- `right` (`Immutable<T>`)
