Freigeben über


ContextStack.Pop-Methode

Entfernt das aktuelle Objekt vom Stapel und gibt seinen Wert zurück.

Namespace: System.ComponentModel.Design.Serialization
Assembly: System (in system.dll)

Syntax

'Declaration
Public Function Pop As Object
'Usage
Dim instance As ContextStack
Dim returnValue As Object

returnValue = instance.Pop
public Object Pop ()
public:
Object^ Pop ()
public Object Pop ()
public function Pop () : Object

Rückgabewert

Das aus dem Stapel entfernte Objekt; NULL (Nothing in Visual Basic), wenn keine Objekte auf dem Stapel vorhanden sind.

Beispiel

Im folgenden Codebeispiel wird veranschaulicht, wie ein Wert aus einer ContextStack-Klasse entfernt wird.

' Pop each item off the stack.        
Dim item As Object = stack.Pop()
While Not item Is Nothing
    Console.WriteLine(("Value popped from stack: " + item.ToString()))
    item = stack.Pop()
End While
// 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.
Object^ item = nullptr;
while ( (item = stack->Pop()) != 0 )
   Console::WriteLine( "Value popped from stack: {0}", item );

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ContextStack-Klasse
ContextStack-Member
System.ComponentModel.Design.Serialization-Namespace