System.IO.MemoryStream.Position Property

Gets or sets the current position within the stream.

Syntax

public override long Position { get; set; }

Value

A long containing the current position within the stream.

Exceptions

TypeReason
ArgumentOutOfRangeExceptionThe value specified for a set operation is negative or greater than the maximum length of a System.IO.MemoryStream.
ObjectDisposedExceptionThe current stream is closed.

Remarks

Note: This property overrides Stream.Position.

Requirements

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0