RecyclableMemoryStream.Position property

October 6, 2021 · View on GitHub

Gets the current position in the stream.

public override long Position { get; set; }

Exceptions

exceptioncondition
ObjectDisposedExceptionObject has been disposed.
ArgumentOutOfRangeExceptionA negative value was passed.
InvalidOperationExceptionStream is in large-buffer mode, but an attempt was made to set the position past the maximum allowed array length.

Remarks

If the buffer has already been converted to a large buffer, then the maximum length (and thus position) is limited by the maximum allowed array length in .NET.

See Also