Sets the current position within the current stream to the specified value.
[Visual Basic] Overrides Public Function Seek( _ ByVal offset As Long, _ ByVal loc As SeekOrigin _ ) As Long [C#] public override long Seek( long offset, SeekOrigin loc ); [C++] public: override __int64 Seek( __int64 offset, SeekOrigin loc ); [JScript] public override function Seek( offset : long, loc : SeekOrigin ) : long;
The new position within the stream, calculated by combining the initial reference point and the offset.
Exception Type | Condition |
---|---|
IOException | Seeking is attempted before the beginning or more than one byte beyond the end of the stream. |
Positioning more than one byte beyond the length of the stream is not supported.
MemoryStream Class | MemoryStream Members | System.IO Namespace