Example #1
0
        static void FilaProduct()
        {
            List <Product> items = new List <Product>()
            {
                new Product("productA", 5.99m),
                new Product("ProductB", 10.50m),
                new Product("ProductC", 255.00m)
            };

            var fila = new Fila <Product>(items);
            var item = fila.Dequeue();

            Console.WriteLine(string.Join(" | ", fila.GetQueueItems().Select(x => x.Name)));
        }
Example #2
0
        static void FilaString()
        {
            List <string> items = new List <string>()
            {
                "one",
                "two",
                "three"
            };

            var fila = new Fila <string>(items);
            var item = fila.Dequeue();

            Console.WriteLine(string.Join(" | ", fila.GetQueueItems()));
        }