IsolatedStorageFileStream.WriteByte(Byte) 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.
Zapisuje pojedynczy bajt do IsolatedStorageFileStream obiektu.
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)
Parametry
- value
- Byte
Wartość bajtu do zapisu w izolowanym pliku magazynu.
Wyjątki
Próba zapisu przekracza limit przydziału IsolatedStorageFileStream dla obiektu.
Przykłady
W poniższym przykładzie kodu pokazano, jak WriteByte 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))