IsolatedStorageFileStream.Write 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Write(ReadOnlySpan<Byte>) |
使用從包含唯讀位元組範圍的緩衝區讀取數據,將位元組區塊寫入至隔離儲存盤案數據流物件。 |
| Write(Byte[], Int32, Int32) |
使用由位元組陣列組成的緩衝區讀取的數據,將位元組區塊寫入至隔離儲存盤案數據流物件。 |
Write(ReadOnlySpan<Byte>)
使用從包含唯讀位元組範圍的緩衝區讀取數據,將位元組區塊寫入至隔離儲存盤案數據流物件。
public:
override void Write(ReadOnlySpan<System::Byte> buffer);
public override void Write(ReadOnlySpan<byte> buffer);
override this.Write : ReadOnlySpan<byte> -> unit
Public Overrides Sub Write (buffer As ReadOnlySpan(Of Byte))
參數
- buffer
- ReadOnlySpan<Byte>
唯讀位元組區間,用於將位元組複製到目前隔離的儲存檔案串流。
適用於
Write(Byte[], Int32, Int32)
使用由位元組陣列組成的緩衝區讀取的數據,將位元組區塊寫入至隔離儲存盤案數據流物件。
public:
override void Write(cli::array <System::Byte> ^ buffer, int offset, int count);
public override void Write(byte[] buffer, int offset, int count);
override this.Write : byte[] * int * int -> unit
Public Overrides Sub Write (buffer As Byte(), offset As Integer, count As Integer)
參數
- buffer
- Byte[]
用來複製位元組到目前隔離儲存檔案串流的位元組陣列。
- offset
- Int32
從中偏移 buffer 的位元組開始。
- count
- Int32
最大可寫入位元組數。
例外狀況
寫入嘗試超過物件的 IsolatedStorageFileStream 配額。
備註
若寫入成功,物件當前位置 IsolatedStorageFileStream 將依照寫入位元組數前進。 若發生例外,物件的當前位置 IsolatedStorageFileStream 保持不變。