IsolatedStorageFileStream.ReadByte Methode

Definitie

Leest één byte uit het IsolatedStorageFileStream object in geïsoleerde opslag.

public:
 override int ReadByte();
public override int ReadByte();
override this.ReadByte : unit -> int
Public Overrides Function ReadByte () As Integer

Retouren

De 8-bits waarde voor niet-ondertekende gehele getallen die worden gelezen uit het geïsoleerde opslagbestand.

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de ReadByte methode kan worden gebruikt om gegevens uit een IsolatedStorageFileStream object te lezen. Zie het overzicht voor de volledige context van dit voorbeeld 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))

Van toepassing op