IsolatedStorageFileStream.WriteByte(Byte) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將單一位元組寫入 IsolatedStorageFileStream 物件。
public:
override void WriteByte(System::Byte value);
public override void WriteByte (byte value);
override this.WriteByte : byte -> unit
Public Overrides Sub WriteByte (value As Byte)
參數
- value
- Byte
要寫入隔離儲存區檔案的位元組值。
例外狀況
寫入嘗試超過 IsolatedStorageFileStream 物件的配額。
範例
下列程式代碼範例示範如何使用 WriteByte 方法從 IsolatedStorageFileStream 物件讀取數據。 如需此範例的完整內容,請參閱概 IsolatedStorageFileStream 觀。
Console::WriteLine( "Writing data to the new file." );
while ( source->Position < source->Length )
{
inputChar = (Byte)source->ReadByte();
target->WriteByte( (Byte)source->ReadByte() );
}
// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console::WriteLine( "Total Bytes Read: {0}", source->Length.ToString() );
Console.WriteLine("Writing data to the new file.");
while (source.Position < source.Length)
{
inputChar = (byte)source.ReadByte();
target.WriteByte(inputChar);
}
// Determine the size of the IsolatedStorageFileStream
// by checking its Length property.
Console.WriteLine("Total Bytes Read: " + source.Length);
Console.WriteLine("Writing data to the new file.")
While source.Position < source.Length
inputChar = CByte(source.ReadByte())
target.WriteByte(inputChar)
End While
' Determine the size of the IsolatedStorageFileStream
' by checking its Length property.
Console.WriteLine(("Total Bytes Read: " & source.Length))