# ImmutableStackCodec&lt;T&gt;.ConvertFromSurrogate(ImmutableStackSurrogate&lt;T&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablestackcodec-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablestackcodec-1/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/ImmutableStackCodec.cs#L28)

```csharp
public override ImmutableStack<T> ConvertFromSurrogate(ref ImmutableStackSurrogate<T> surrogate)
```

Converts a value from the surrogate type to the field type.

### Parameters

- `surrogate` (`ImmutableStackSurrogate<T>`): The surrogate.

### Returns

The value.
