次の方法で共有


IsolatedStorageFileStream.WriteByte メソッド

IsolatedStorageFileStream に 1 バイトを書き込みます。

Overrides Public Sub WriteByte( _
   ByVal value As Byte _)
[C#]
public override void WriteByte(bytevalue);
[C++]
public: void WriteByte(unsigned charvalue);
[JScript]
public override function WriteByte(
   value : Byte);

パラメータ

  • value
    分離ストレージ ファイルに書き込むバイト値。

例外

例外の種類 条件
IsolatedStorageException IsolatedStorageFileStream のクォータを超えて書き込もうとしました。

使用例

[Visual Basic, C#, C++] WriteByte メソッドを使用して IsolatedStorageFileStream にデータを書き込むコードの例を次に示します。この例のコンテキスト全体については、 IsolatedStorageFileStream の概要を参照してください。

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

[C#] 
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);

[C++] 
Console::WriteLine(S"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(S"Total Bytes Read: {0}", source->Length.ToString());

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

IsolatedStorageFileStream クラス | IsolatedStorageFileStream メンバ | System.IO.IsolatedStorage 名前空間