Queue Collections Learn programming C# Sharp

Lesson:

Dynamic Memory Management


Exercise:

Queue Collections 14


Objetive:

Queue-Collections


Code:

using System;
using System.Collections;
class Program
{
    static void Main()
    {
        bool depurando = true;

        Queue miCola = new Queue();
        miCola.Enqueue("Hola,");
        miCola.Enqueue("soy");
        miCola.Enqueue("yo");

        int cantidadCola = miCola.Count;

        for (byte i = 0; i < cantidadCola; i++)
            Console.WriteLine(miCola.Dequeue());

        if (depurando)
            Console.ReadLine();
    }
}