Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

UnmanagedMemoryStream.Seek Method

July 28, 2014

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Sets the current position of the current stream to the given value.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public override long Seek(
	long offset,
	SeekOrigin loc
)

Parameters

offset
Type: System.Int64
The point relative to origin to begin seeking from.
loc
Type: System.IO.SeekOrigin
Specifies the beginning, the end, or the current position as a reference point for origin, using a value of type SeekOrigin.

Return Value

Type: System.Int64
The new position in the stream.

ExceptionCondition
IOException

An attempt was made to seek before the beginning of the stream.

ArgumentOutOfRangeException

The offset value is larger than the maximum size of the stream.

ArgumentException

loc is invalid.

ObjectDisposedException

The stream is closed.

For more information about seeking, see Seek.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2014 Microsoft