Method
Write
func Write(buffer: byte[], offset: int, count: int, cancellationToken: CancellationToken = default) -> Task<Result<void, StreamError>>
Declaring type: MemoryStream
Module: System.IO
Assembly: System.Runtime.dll
Source file: MemoryStream.rvn
Implements OutputStream.Write
Writes the full range to memory and returns a settled task.
Parameters
| Name | Type | Description |
|---|---|---|
buffer |
Byte[] | |
offset |
Int32 | |
count |
Int32 | |
cancellationToken |
CancellationToken |
Return value
Task<Result<void, StreamError>>
Remarks
Pre-cancellation wins before validation or mutation. Range, closed-state and quota errors preserve storage and cursor, as with Write.