MemoryStream.Position Proprietà

Definizione

Ottiene o imposta la posizione corrente all'interno del flusso.

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

Valore della proprietà

Posizione corrente all'interno del flusso.

Eccezioni

La posizione è impostata su un valore negativo o su un valore maggiore di Int32.MaxValue.

Il flusso è chiuso.

Esempio

Questo esempio di codice fa parte di un esempio più ampio fornito per la 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}\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())

Si applica a

Vedi anche