# ArrayStreamBufferWriter Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.adaptors.arraystreambufferwriter/)

## ArrayStreamBufferWriter(Stream, int) {#constructor-system-io-stream-int-25ece85d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.adaptors.arraystreambufferwriter/constructors/constructor-system-io-stream-int-25ece85d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/Adaptors/ArrayStreamBufferWriter.cs#L24-L32)

```csharp
public ArrayStreamBufferWriter(Stream stream, int sizeHint = 0)
```

Initializes a new instance of the [ArrayStreamBufferWriter](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.adaptors.arraystreambufferwriter/) struct.

### Parameters

- `stream` (`Stream`): The stream.
- `sizeHint` (`int`): The size hint.
