Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Person lena = new Person {
                Name = "Лена"
            };
            Person sasha = new Person {
                Name = "Саша"
            };
            Person sonya = new Person {
                Name = "Соня"
            };

            List <Person> list = new List <Person>();

            list.Add(lena);
            list.Add(sasha);
            list.Add(sonya);
            Office office = new Office(list);

            /*lena.onCome += lena.Greet;
             * sasha.onCome += sasha.Greet;
             * sonya.onCome += sonya.Greet;*/
            lena.Come(DateTime.Now);
            sasha.Come(DateTime.Now);
            sonya.Come(DateTime.Now);
            lena.Leave();
            sasha.Leave();
            sonya.Leave();

            Console.ReadLine();
        }