using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QueueSimple
{
    class Program
    {
        static void Main(string[] args)
        {
            // Creates and initializes a new Queue.
            Queue<string> myQ = new Queue<string>();
            myQ.Enqueue("Hello");
            myQ.Enqueue("World");
            myQ.Enqueue("!");
            // Displays the properties and values of the Queue.
            Console.WriteLine("myQ");
            Console.WriteLine("\tCount:    {0}", myQ.Count);
            Console.Write("\tValues:");
            PrintValues(myQ);
            Console.ReadKey();
        }


        public static void PrintValues(IEnumerable<string> myCollection)
        {
            foreach (string obj in myCollection)
                Console.Write("    {0}", obj);
            Console.WriteLine();
        }
    }
}

