# ImmutableSortedDictionaryCodec&lt;TKey, TValue&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/ImmutableSortedDictionaryCodec.cs#L16)

```csharp
public sealed class ImmutableSortedDictionaryCodec<TKey, TValue> : GeneralizedReferenceTypeSurrogateCodec<ImmutableSortedDictionary<TKey, TValue>, ImmutableSortedDictionarySurrogate<TKey, TValue>>
```

Serializer for `System.Collections.Immutable.ImmutableSortedDictionary-2`.

## Type parameters

- `TKey`: The key type.
- `TValue`: The value type.

## Constructors

- [ImmutableSortedDictionaryCodec&lt;TKey, TValue&gt;(IValueSerializer&lt;ImmutableSortedDictionarySurrogate&lt;TKey, TValue&gt;&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablesorteddictionarycodec-2/constructors/constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-fd33bd62/)

## Methods

- [ConvertFromSurrogate(ImmutableSortedDictionarySurrogate&lt;TKey, TValue&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablesorteddictionarycodec-2/methods/convertfromsurrogate-ref-orleans-serialization-codecs-immutablesorteddictionarys-5a01c984/)
- [ConvertToSurrogate(ImmutableSortedDictionary&lt;TKey, TValue&gt;, ImmutableSortedDictionarySurrogate&lt;TKey, TValue&gt;)](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablesorteddictionarycodec-2/methods/converttosurrogate-system-collections-immutable-immutablesorteddictionary-tkey-t-8bac24aa/)
