語言

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 物件必須同時支援寫入與尋找。

適用於