# ImmutableSortedDictionaryCodec&lt;TKey, TValue&gt; Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablesorteddictionarycodec-2/)

## ImmutableSortedDictionaryCodec&lt;TKey, TValue&gt;(IValueSerializer&lt;ImmutableSortedDictionarySurrogate&lt;TKey, TValue&gt;&gt;) {#constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-fd33bd62}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.immutablesorteddictionarycodec-2/constructors/constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-fd33bd62/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/ImmutableSortedDictionaryCodec.cs#L22-L24)

```csharp
public ImmutableSortedDictionaryCodec<TKey, ImmutableSortedDictionaryCodec(IValueSerializer<ImmutableSortedDictionarySurrogate<TKey, TValue>> surrogateSerializer)
```

Initializes a new instance of the `Orleans.Serialization.Codecs.ImmutableSortedDictionaryCodec-2` class.

### Parameters

- `surrogateSerializer` (`IValueSerializer<ImmutableSortedDictionarySurrogate<TKey, TValue>>`): The surrogate serializer.
