PipeStream.Seek(Int64, SeekOrigin) 方法
定义
将当前流的当前位置设置为指定值。Sets the current position of the current stream to the specified value.
public:
override long Seek(long offset, System::IO::SeekOrigin origin);
public override long Seek (long offset, System.IO.SeekOrigin origin);
override this.Seek : int64 * System.IO.SeekOrigin -> int64
Public Overrides Function Seek (offset As Long, origin As SeekOrigin) As Long
参数
- offset
- Int64
相对于 origin 的点,从此处开始查找。The point, relative to origin, to begin seeking from.
- origin
- SeekOrigin
使用 SeekOrigin 类型的值,将开始位置、结束位置或当前位置指定为 offset 的参考点。Specifies the beginning, the end, or the current position as a reference point for offset, using a value of type SeekOrigin.
返回
流中的新位置。The new position in the stream.
注解
Seek管道不支持方法,并在 NotSupportedException 调用时引发。The Seek method is not supported in pipes and raises a NotSupportedException when it is called.