Freigeben über


IsolatedStorageFileStream.Length Eigenschaft

Definition

Ruft die Länge des IsolatedStorageFileStream Objekts ab.

public:
 virtual property long Length { long get(); };
public override long Length { get; }
member this.Length : int64
Public Overrides ReadOnly Property Length As Long

Eigenschaftswert

Die Länge des IsolatedStorageFileStream Objekts in Byte.

Beispiele

Im folgenden Codebeispiel wird die Length Eigenschaft veranschaulicht.

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

Hinweise

Length stellt die Anzahl der Bytes dar, die sich derzeit in der Datei befinden. Es ist nicht von einem isolierten Speicherkontingent betroffen.

Gilt für: