Seek Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

public override long Seek(
	long offset,
	SeekOrigin origin


Type: System..::..Int64
The point relative to origin from which to begin seeking.
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.


Use the FileStream..::..CanSeek property to determine whether the current instance supports seeking. For additional information, see Stream..::..CanSeek.