Advance()

ArrayBufferWriter::Advance(int32_t) method

Notifies the writer that count amount of data was written to the output Span/Memory.

void System::Buffers::ArrayBufferWriter<T>::Advance(int32_t count) override

Arguments

ParameterTypeDescription
countint32_tThe number of elements that were written.

Exceptions

ExceptionDescription
ArgumentExceptionIf count is negative.
InvalidOperationExceptionIf attempting to advance past the end of the underlying buffer.

Remarks

You must request a new buffer after calling Advance to continue writing more data and cannot write to a previously acquired buffer.

See Also