IsolatedStorageFileStream.WriteByte(Byte) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Escreve 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 do byte a escrever no ficheiro de armazenamento isolado.
Exceções
A tentativa de escrita excede a quota para o IsolatedStorageFileStream objeto.
Exemplos
O exemplo de código seguinte demonstra como o WriteByte método pode ser usado para ler dados de um IsolatedStorageFileStream objeto. Para o contexto completo deste exemplo, veja 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))