Share via


Stream.Seek Method

When overridden in a derived class, this method sets the position within the current Stream object.

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

Syntax

public virtual abstract long Seek (
         longoffset,
         SeekOriginorigin
)

Parameters

  • offset
    A byte offset relative to the origin parameter. A positive value seeks forward from the origin parameter. A negative value seeks backward.
  • origin
    A SeekOrigin value that indicates the reference point to be used to obtain the new position.

Return Value

The new position within the current stream.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Stream Class
Stream Members
System.IO Namespace