Windows apps
Collapse the table of content
Expand the table of content
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

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
Not applicable.

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 Server 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 Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

Show:
© 2016 Microsoft