# MemoryStreamBufferWriter Constructors

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

## MemoryStreamBufferWriter(MemoryStream) {#constructor-system-io-memorystream-35faaa6a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.buffers.adaptors.memorystreambufferwriter/constructors/constructor-system-io-memorystream-35faaa6a/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Serialization/Buffers/Adaptors/MemoryStreamBufferWriter.cs#L21-L22)

```csharp
public MemoryStreamBufferWriter(MemoryStream stream)
```

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

### Parameters

- `stream` (`MemoryStream`): The stream.
