Пример #1
0
        static void Main(string[] args)
        {
            ElectronicQueue <Person> people = new ElectronicQueue <Person>();

            people.Enqueue(new Person("dwdwdwd", "wdwdw", 11));
            people.Enqueue(new Person("wef", "kl;k", 21));
            people.Enqueue(new Person("wfwf", "ff", 31));

            people.Dequeue();
            people.Dequeue();
            people.Dequeue();
        }
        static void Main(string[] args)
        {
            ElectronicQueue <Person> eq = new ElectronicQueue <Person>();

            eq.Enqueue(new Person()
            {
                Name = "Pasha", Surname = "Shulmin", Age = 18
            });
            eq.Enqueue(new Person()
            {
                Name = "Maria", Surname = "Gordenko", Age = 20
            });
            foreach (Person p in eq.queue)
            {
                Console.WriteLine(p);
            }
        }
Пример #3
0
        public QueueForm()
        {
            InitializeComponent();

            // Create queue.
            _eq = new ElectronicQueue <Person>();

            #region Example.

            //eq.AddToElectronicQueue(new Person("Jabba", "Hutt", 604));
            //eq.AddToElectronicQueue(new Person("Wedge", "Antille", 25));
            //eq.AddToElectronicQueue(new Person("Han", "Solo", 33));
            //eq.AddToElectronicQueue(new Person("Leia", "Organa", 23));
            //eq.AddToElectronicQueue(new Person("Lando", "Calrissian", 35));
            //eq.AddToElectronicQueue(new Person("Anakin", "Skywalker", 46));

            #endregion
        }