Share via


ContextStack.Push(Object) Metodo

Definizione

Inserisce l'oggetto specificato nello stack.

public:
 void Push(System::Object ^ context);
public void Push (object context);
member this.Push : obj -> unit
Public Sub Push (context As Object)

Parametri

context
Object

Oggetto di contesto da inserire nello stack.

Eccezioni

context è null.

Esempio

Nell'esempio di codice seguente viene illustrato il push di valori in un oggetto ContextStack.

// Push ten items on to the stack and output the value of each.
for ( int number = 0; number < 10; number++ )
{
   Console::WriteLine( "Value pushed to stack: {0}", number );
   stack->Push( number );
}
// Push ten items on to the stack and output the value of each.
for( int number = 0; number < 10; number ++ )
{
    Console.WriteLine( "Value pushed to stack: "+number.ToString() );
    stack.Push( number );
}
' Push ten items on to the stack and output the value of each.
Dim number As Integer
For number = 0 To 9
    Console.WriteLine(("Value pushed to stack: " + number.ToString()))
    stack.Push(number)
Next number

Si applica a