# ObjectSerializer.Serialize(object, Writer&lt;TBufferWriter&gt;, Type)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.objectserializer/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.objectserializer/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Serializer.cs)

```csharp
public void Serialize<TBufferWriter>(object value, ref Writer<TBufferWriter> destination, Type type)
```

Serializes the provided `value` into `destination`.

### Parameters

- `value` (`object`): The value to serialize.
- `destination` (`Writer<TBufferWriter>`): The destination where serialized data will be written.
- `type` (`Type`): The expected type of the value.
