Compartilhar via


IsolatedStorageFileStream.ReadByte Método

Definição

Lê um único byte do objeto IsolatedStorageFileStream no armazenamento isolado.

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

Retornos

O valor de inteiro sem sinal de 8 bits lido do arquivo de armazenamento isolado.

Exemplos

O exemplo de código a seguir demonstra como o ReadByte método pode ser usado para ler dados de um IsolatedStorageFileStream objeto . Para obter o contexto completo deste exemplo, consulte a IsolatedStorageFileStream visão geral.

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

Aplica-se a