Windows Dev Center

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

Note: This method is new in the .NET Framework version 2.0.

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

This method is not CLS-compliant.  

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

public override long Seek (
	long offset,
	SeekOrigin loc
)
public long Seek (
	long offset, 
	SeekOrigin loc
)
public override function Seek (
	offset : long, 
	loc : SeekOrigin
) : long

Parameters

offset

The point relative to origin to begin seeking from.

loc

Specifies the beginning, the end, or the current position as a reference point for origin, using a value of type SeekOrigin.

Return Value

The new position in the stream.

Exception typeCondition

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 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

Show:
© 2015 Microsoft