new Stack(new int[] { 1, 2, 3, 4, 5, 6 }) : Stack : Collections Data Structure C# Source Code


Custom Search

C# Source Code » Collections Data Structure » Stack »

 

new Stack(new int[] { 1, 2, 3, 4, 5, 6 })








    
 

using System;
using System.Collections;

public class Starter {
    public static void Main() {
        Stack numbers = new Stack(new int[] { 1, 2, 3, 4, 5, 6 });
        int total = numbers.Count;
        for (int count = 0; count < total; ++count) {
            Console.WriteLine(numbers.Pop());
        }
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Collections Data Structure
» Stack