IsolatedStorageFileStream.ReadByte メソッド
分離ストレージで IsolatedStorageFileStream から 1 バイトを読み取ります。
Overrides Public Function ReadByte() As Integer
[C#]
public override int ReadByte();
[C++]
public: int ReadByte();
[JScript]
public override function ReadByte() : int;
戻り値
分離ストレージ ファイルから読み取られた 8 ビット符号なし整数値。
使用例
[Visual Basic, C#, C++] ReadByte メソッドを使用して 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 名前空間