IsolatedStorageFileStream.SetLength(Int64) 方法

定义

将此 IsolatedStorageFileStream 对象的长度设置为指定的 value

public:
 override void SetLength(long value);
public override void SetLength (long value);
override this.SetLength : int64 -> unit
Public Overrides Sub SetLength (value As Long)

参数

value
Int64

IsolatedStorageFileStream 对象的新长度。

例外

value 为负数。

注解

如果指定的 value 长度小于对象的当前长度 IsolatedStorageFileStream ,则会截断流。 如果指定的 value 长度大于流的当前长度,则会展开该流。 如果流已展开,则未定义旧长度和新长度之间的流内容。 若要使用此方法,对象 IsolatedStorageFileStream 必须同时支持编写和查找。

适用于