# Codec_ImmutableDictionarySurrogate&lt;TKey, TValue&gt;.WriteField(Writer&lt;TBufferWriter&gt;, uint, Type, ImmutableDictionarySurrogate&lt;TKey, TValue&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-immutabledictionarysurrogate-2/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleanscodegen.orleans.serialization.codecs.codec-immutabledictionarysurrogate-2/methods/)

```csharp
public void Codec_ImmutableDictionarySurrogate<TKey, WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, ImmutableDictionarySurrogate<TKey, TValue> value)
```

Writes a field.

### Parameters

- `writer` (`Writer<TBufferWriter>`): The writer.
- `fieldIdDelta` (`uint`): The field identifier delta.
- `expectedType` (`Type`): The expected type.
- `value` (`ImmutableDictionarySurrogate<TKey, TValue>`): The value.
