FileStream.Seek Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Sets the current position of this stream to the given value.
Assembly: mscorlib (in mscorlib.dll)
'Declaration Public Overrides Function Seek ( _ offset As Long, _ origin As SeekOrigin _ ) As Long
Parameters
- offset
- Type: System.Int64
The point relative to origin from which to begin seeking.
- origin
- 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.
| Exception | Condition |
|---|---|
| IOException | An I/O error occurs. |
| NotSupportedException | The stream does not support seeking, such as if the FileStream is constructed from a pipe or console output. |
| ArgumentException | Attempted seeking before the beginning of the stream. |
| ObjectDisposedException | Methods were called after the stream was closed. |
Show: