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

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

## ConcurrentDictionaryCodec&lt;TKey, TValue&gt;(IValueSerializer&lt;ConcurrentDictionarySurrogate&lt;TKey, TValue&gt;&gt;) {#constructor-orleans-serialization-serializers-ivalueserializer-orleans-serializa-83e500c4}

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

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

```csharp
public ConcurrentDictionaryCodec<TKey, ConcurrentDictionaryCodec(IValueSerializer<ConcurrentDictionarySurrogate<TKey, TValue>> surrogateSerializer)
```

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

### Parameters

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