Example #1
0
        static void Main(string[] args)
        {
            var office = new Office();
            Person.CameEvent += office.OnCame;
            Person.LeftEvent += office.OnLeft;

            var john = new Person("Джон");
            john.Came(10.05);

            var bill = new Person("Билл");
            bill.Came(12.50);

            var hugo = new Person("Хьюго");
            hugo.Came(17.10);

            john.Left();
            bill.Left();
            hugo.Left();

            Console.ReadKey();
        }