Changes the position within the current stream by the given offset, which is relative to the stated origin.
- offset
- A long that specifies the new position within the stream. This is relative to the loc parameter, and can be positive or negative.
- loc
- A System.IO.SeekOrigin value that specifies the seek reference point.
A long containing the new position within the stream, calculated by combining the seek reference point and the offset.
Type Reason System.IO.IOException Seeking is attempted before the beginning of the stream. ArgumentOutOfRangeException offset is greater than the maximum length of System.IO.MemoryStream. ArgumentException loc is not a valid System.IO.SeekOrigin value. ObjectDisposedException The current stream is closed.
Note: This method overrides Stream.Seek(long, SeekOrigin).
Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0