Compartir a través de


ContextStack.Push(Object) Método

Definición

Inserta o coloca el objeto especificado en la pila.

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

Parámetros

context
Object

Objeto de contexto que se va a insertar en la pila.

Excepciones

context es null.

Ejemplos

En el ejemplo de código siguiente se muestra cómo insertar valores en .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

Se aplica a