MemoryStream.Position Propriedade

Definição

Obtém ou define a posição atual dentro do fluxo.

public:
 virtual property long Position { long get(); void set(long value); };
public override long Position { get; set; }
member this.Position : int64 with get, set
Public Overrides Property Position As Long

Valor de Propriedade

A posição atual dentro do riacho.

Exceções

A posição é definida para um valor negativo ou superior a Int32.MaxValue.

O riacho está fechado.

Exemplos

Este exemplo de código faz parte de um exemplo maior fornecido para a MemoryStream classe.

// Write the stream properties to the console.
Console.WriteLine(
    "Capacity = {0}, Length = {1}, Position = {2}\n",
    memStream.Capacity.ToString(),
    memStream.Length.ToString(),
    memStream.Position.ToString());
' Write the stream properties to the console.
Console.WriteLine( _
    "Capacity = {0}, Length = {1}, Position = {2}", _
    memStream.Capacity.ToString(), _
    memStream.Length.ToString(), _
    memStream.Position.ToString())

Aplica-se a

Ver também