# FrozenDictionaryCodec&lt;TKey, TValue&gt; Methods

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

## ConvertFromSurrogate(FrozenDictionarySurrogate&lt;TKey, TValue&gt;) {#convertfromsurrogate-ref-orleans-serialization-codecs-frozendictionarysurrogate-b45f856b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.frozendictionarycodec-2/methods/convertfromsurrogate-ref-orleans-serialization-codecs-frozendictionarysurrogate-b45f856b/)

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

```csharp
public override FrozenDictionary<TKey, TValue> FrozenDictionaryCodec<TKey, ConvertFromSurrogate(ref FrozenDictionarySurrogate<TKey, TValue> surrogate)
```

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

### Parameters

- `surrogate` (`FrozenDictionarySurrogate<TKey, TValue>`): The surrogate.

### Returns

The value.

## ConvertToSurrogate(FrozenDictionary&lt;TKey, TValue&gt;, FrozenDictionarySurrogate&lt;TKey, TValue&gt;) {#converttosurrogate-system-collections-frozen-frozendictionary-tkey-tvalue-ref-or-6e663d5d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.codecs.frozendictionarycodec-2/methods/converttosurrogate-system-collections-frozen-frozendictionary-tkey-tvalue-ref-or-6e663d5d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Codecs/FrozenDictionaryCodec.cs#L34-L36)

```csharp
public override void FrozenDictionaryCodec<TKey, ConvertToSurrogate(FrozenDictionary<TKey, TValue> value, ref FrozenDictionarySurrogate<TKey, TValue> surrogate)
```

Converts a value to the surrogate type.

### Parameters

- `value` (`FrozenDictionary<TKey, TValue>`): The value.
- `surrogate` (`FrozenDictionarySurrogate<TKey, TValue>`): The surrogate.
