MemoryStream: SeekPosition |
Sets the position within the current stream to the specified value.
Public Function SeekPosition( ByVal Offset As Currency, ByVal Loc As SeekOrigin ) As Currency
Seeking to any location beyond the length of the stream is supported.
Do not use the SeekPosition method to determine the new position in the stream if the MemoryStream was initialized with a non-zero offset. If you do, SeekPosition will return an inaccurate value. Instead, use the Position property to get the new position of the stream.
Exception | Condition |
---|---|
ArgumentOutOfRangeException | Offset is greater than max 32-bit value. |
ArgumentException | There is an invalid SeekOrigin. |
ObjectDisposedException | The current stream instance is closed. |