IsolatedStorageFileStream.Seek(Int64, SeekOrigin) 方法

定义

将此 IsolatedStorageFileStream 对象的当前位置设置为指定值。Sets the current position of this IsolatedStorageFileStream object 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

IsolatedStorageFileStream 对象的新位置。The new position of the IsolatedStorageFileStream object.

origin
SeekOrigin

SeekOrigin 值之一。One of the SeekOrigin values.

返回

IsolatedStorageFileStream 对象中的新位置。The new position in the IsolatedStorageFileStream object.

异常

origin 必须为 SeekOrigin 值之一。The origin must be one of the SeekOrigin values.

注解

某些 IsolatedStorageFileStream 对象支持定位超出流的长度,在这种情况下,其他对象会引发异常。Some IsolatedStorageFileStream objects support positioning beyond the length of the stream, others will throw an exception in this case.

适用于