Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 57 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. $queue = [System.Collections.ArrayList]@()
  2.  
  3. $queue.Add("Object1") | Out-null
  4. $queue.Add("Object2") | Out-null
  5. "=========== Queue ================"
  6. foreach ($i in $queue){
  7.     $i
  8. }
  9.  
  10. $stack = $queue.Reverse()
  11. "=========== stack ================"
  12. foreach($i in $stack)
  13. {
  14.     $i
  15. }
  16.    
  17. =========== Queue ================
  18. Object1
  19. Object2
  20. =========== stack ================
  21. Object2
  22. Object1
  23.    
  24. =========== Queue ================
  25. Object1
  26. Object2
  27. =========== stack ================
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top