ContextStack.Push(Object) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Empurra, ou coloca, o objeto especificado na pilha.
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
O objeto de contexto a empurrar para a pilha.
Exceções
context é null.
Exemplos
O exemplo de código seguinte demonstra a introdução de valores para um 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