Sets the position within the current stream.
Namespace:
Rebex.Security
Assembly:
Rebex.Security (in Rebex.Security.dll)
Syntax
Visual Basic |
---|
Public Overrides Function Seek ( _ offset As Long, _ origin As SeekOrigin _ ) As Long |
C# |
---|
public override long Seek( long offset, SeekOrigin origin ) |
Parameters
- offset
- Type: System..::..Int64
A byte offset relative to the origin parameter.
- origin
- Type: System.IO..::..SeekOrigin
A value of type SeekOrigin indicating the reference point used to obtain the new position.
Return Value
The new position within the current stream.Exceptions
Exception | Condition |
---|---|
System.IO..::..IOException | An I/O error occurs. |
System..::..ObjectDisposedException | Methods were called after the stream was closed. |
System..::..InvalidOperationException | Position is set to a negative number or is greater than the stream length. If you need to increase stream length, use the SetLength method first. |