Skip to content

MemoryBufferWriter.GetSpan(int)

GetSpan(int)

View source
public Span<byte> GetSpan(int sizeHint = 0)
Returns a System.Span to write to that is at least the requested size (specified by sizeHint).

Parameters

sizeHintint
The minimum length of the returned System.Span. If 0, a non-empty buffer is returned.

Returns

A System.Span of at least the size sizeHint. If sizeHint is 0, returns a non-empty buffer.