# ImmutableStackCodec&lt;T&gt;

Package: [Microsoft.Orleans.Serialization](/orleans/docs/api/csharp/microsoft.orleans.serialization/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Serialization) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/ImmutableStackCodec.cs#L17)

```csharp
public sealed class ImmutableStackCodec<T> : GeneralizedReferenceTypeSurrogateCodec<ImmutableStack<T>, ImmutableStackSurrogate<T>>
```

Serializer for `System.Collections.Immutable.ImmutableStack-1`.

## Type parameters

- `T`: The element type.

## Constructors

- [ImmutableStackCodec&lt;T&gt;(IValueSerializer&lt;ImmutableStackSurrogate&lt;T&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablestackcodec-1/constructors/constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-66c40637/)

## Methods

- [ConvertFromSurrogate(ImmutableStackSurrogate&lt;T&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablestackcodec-1/methods/convertfromsurrogate-ref-orleans-serialization-codecs-immutablestacksurrogate-t-a23bc45b/)
- [ConvertToSurrogate(ImmutableStack&lt;T&gt;, ImmutableStackSurrogate&lt;T&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablestackcodec-1/methods/converttosurrogate-system-collections-immutable-immutablestack-t-ref-orleans-ser-d21c7455/)
