7.4.5.8 Seek
Overrides Stream.
This method sets the position within the current stream and returns the new position within the current stream.
Declaration
// C# public long Seek(long offset, SeekOrigin origin);
Parameters
-
offsetA byte offset relative to origin.
-
If
offsetis negative, the new position precedes the position specified byoriginby the number of bytes specified byoffset. -
If offset is zero, the new position is the position specified by
origin. -
If
offsetis positive, the new position follows the position specified byoriginby the number of bytes specified byoffset.
-
-
originA value of type
SeekOriginindicating the reference point used to obtain the new position.
Return Value
The new Position within the current stream.
Exceptions
ObjectDisposedException - The object is already disposed.
InvalidOperationException - The OracleConnection is not open or has been closed during the lifetime of the object
Remarks
Use the CanSeek property to determine whether or not the current instance supports seeking. Seeking to any location beyond the length of the stream is supported.