Language

IsolatedStorageFileStream.WriteByte(Byte) メソッド

定義

IsolatedStorageFileStream オブジェクトに 1 バイトを書き込みます。

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(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))

適用対象