IsolatedStorageFileStream.ReadByte 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從隔離儲存中的物件讀取一個位元組 IsolatedStorageFileStream 。
public:
override int ReadByte();
public override int ReadByte();
override this.ReadByte : unit -> int
Public Overrides Function ReadByte () As Integer
傳回
從隔離儲存檔案讀取的 8 位元無符號整數值。
範例
以下程式碼範例展示了如何 ReadByte 使用此方法從物件讀取資料 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))