# Codec_RandomlyInjectedInconsistentStateException.WriteField(Writer&lt;TBufferWriter&gt;, uint, Type, RandomlyInjectedInconsistentStateException)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleanscodegen.orleans.testinghost.codec-randomlyinjectedinconsistentstateexception/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleanscodegen.orleans.testinghost.codec-randomlyinjectedinconsistentstateexception/methods/)

```csharp
public void WriteField<TBufferWriter>(ref Writer<TBufferWriter> writer, uint fieldIdDelta, Type expectedType, RandomlyInjectedInconsistentStateException value)
```

Writes a field.

### Parameters

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