# Serializer&lt;T&gt;.SerializeToArray(T)

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

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

```csharp
public byte[] SerializeToArray(T value)
```

Serializes the provided `value` into a new array.

### Parameters

- `value` (`T`): The value to serialize.

### Returns

A byte array containing the serialized value.
