IsolatedStorageFileStream.WriteByte(Byte) Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Grava um único byte no IsolatedStorageFileStream objeto.
public:
override void WriteByte(System::Byte value);
public override void WriteByte(byte value);
override this.WriteByte : byte -> unit
Public Overrides Sub WriteByte (value As Byte)
Parâmetros
- value
- Byte
O valor de byte a ser gravado no arquivo de armazenamento isolado.
Exceções
A tentativa de gravação excede a cota do IsolatedStorageFileStream objeto.
Exemplos
O exemplo de código a seguir demonstra como o WriteByte 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(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))