Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# iterate and pop all elements in stack

Stack<Action> stack = new Stack<Action>();
stack.Push(()=>{Console.Write("executed");});

while (stack.Count>0){
    stack.Pop().Invoke();
}
 
PREVIOUS NEXT
Tagged: #iterate #pop #elements #stack
ADD COMMENT
Topic
Name
7+7 =