IsolatedStorageFileStream.WriteByte(Byte) Methode

Definition

Schreibt ein einzelnes Byte in das IsolatedStorageFileStream Objekt.

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)

Parameter

value
Byte

Der Bytewert, der in die isolierte Speicherdatei geschrieben werden soll.

Ausnahmen

Der Schreibversuch überschreitet das Kontingent für das IsolatedStorageFileStream Objekt.

Beispiele

Im folgenden Codebeispiel wird veranschaulicht, wie die WriteByte Methode zum Lesen von Daten aus einem IsolatedStorageFileStream Objekt verwendet werden kann. Den vollständigen Kontext dieses Beispiels finden Sie in der IsolatedStorageFileStream Übersicht.

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))

Gilt für: