ContextStack.Pop Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Supprime l’objet actuel de la pile, retournant sa valeur.
public:
System::Object ^ Pop();
public object Pop();
member this.Pop : unit -> obj
Public Function Pop () As Object
Retours
Objet supprimé de la pile ; null si aucun objet n’est sur la pile.
Exemples
L’exemple de code suivant illustre la suppression d’une valeur d’un ContextStack.
// Pop each item off the stack.
Object^ item = nullptr;
while ( (item = stack->Pop()) != 0 )
Console::WriteLine( "Value popped from stack: {0}", item );
// Pop each item off the stack.
object item = null;
while( (item = stack.Pop()) != null )
Console.WriteLine( "Value popped from stack: "+item.ToString() );
' Pop each item off the stack.
Dim item As Object = stack.Pop()
While item IsNot Nothing
Console.WriteLine(("Value popped from stack: " + item.ToString()))
item = stack.Pop()
End While