IsolatedStorageFileStream.ReadByte Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Odczytuje pojedynczy bajt z IsolatedStorageFileStream obiektu w izolowanym magazynie.
public:
override int ReadByte();
public override int ReadByte();
override this.ReadByte : unit -> int
Public Overrides Function ReadByte () As Integer
Zwraca
8-bitowa wartość całkowita bez znaku odczytuje się z izolowanego pliku magazynu.
Przykłady
W poniższym przykładzie kodu pokazano, jak ReadByte można użyć metody do odczytywania danych z IsolatedStorageFileStream obiektu. Pełny kontekst tego przykładu zawiera IsolatedStorageFileStream omówienie.
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))