# ValueSerializer&lt;T&gt;.Serialize(T, Writer&lt;TBufferWriter&gt;)

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

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

```csharp
public void Serialize<TBufferWriter>(scoped ref T value, ref Writer<TBufferWriter> destination)
```

Serializes the provided `value` into `destination`.

### Parameters

- `value` (`T`): The value to serialize.
- `destination` (`Writer<TBufferWriter>`): The destination where serialized data will be written.
