IsolatedStorageFileStream.WriteByte(Byte) Metod

Definition

Skriver en enda byte till objektet IsolatedStorageFileStream .

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)

Parametrar

value
Byte

Byte-värdet som ska skrivas till den isolerade lagringsfilen.

Undantag

Skrivförsöket överskrider kvoten för IsolatedStorageFileStream objektet.

Exempel

Följande kodexempel visar hur WriteByte metoden kan användas för att läsa data från ett IsolatedStorageFileStream objekt. Fullständig kontext för det här exemplet finns i översikten IsolatedStorageFileStream .

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

Gäller för