XsFileStream.Seek Method | |
Sets the current position of this stream to the given value.
Namespace:
XSharp.IO
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax VIRTUAL METHOD Seek(
offset AS INT64,
origin AS SeekOrigin
) AS INT64
public override long Seek(
long offset,
SeekOrigin origin
)
Request Example
View SourceParameters
- offset
- Type: Int64
The point relative to origin from which to begin seeking. - origin
- Type: SeekOrigin
Specifies the beginning, the end, or the current position as a reference point for offset, using a value of type SeekOrigin.
Return Value
Type:
Int64The new position in the stream.
Exceptions Exception | Condition |
---|
IOException | An I/O error occurred. |
NotSupportedException | The stream does not support seeking, such as if the FileStream is constructed from a pipe or console output. |
ArgumentException | Seeking is attempted before the beginning of the stream. |
ObjectDisposedException | Methods were called after the stream was closed. |
See Also