Idioma

IsolatedStorageFileStream.Length Propriedade

Definição

Obtém o comprimento do IsolatedStorageFileStream objeto.

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

Valor de Propriedade

O comprimento do IsolatedStorageFileStream objeto em bytes.

Exemplos

O seguinte exemplo de código demonstra a Length propriedade.

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

Observações

Length representa o número de bytes atualmente no ficheiro. Não é afetado pela quota de armazenamento isolada.

Aplica-se a