Example #1
0
        static void Main(string[] args)
        {
            Queue1 queue1 = new Queue1();

            queue1.Enqueue(44);
            queue1.Enqueue(765);
            queue1.Enqueue(87);
            queue1.Enqueue(23);
            queue1.Enqueue(1);

            Console.WriteLine(queue1.Dequeue());
            Console.ReadLine();
        }
Example #2
0
        static void Main(string[] args)
        {
            var    nameQueue = new Queue1();
            string name      = "a";

            while (name != string.Empty)
            {
                name = Console.ReadLine();
                nameQueue.Push(name);
            }

            while (!nameQueue.Empty)
            {
                string names = nameQueue.Pop();
                Console.WriteLine(names);
            }
        }