Пример #1
0
        static void Main(string[] args)
        {
            CalculateWithEvent myCalculate = new CalculateWithEvent();
            EventListener      myListener  = new EventListener(myCalculate);

            myCalculate.Add(2, 3);
            myCalculate.Sub(3, 2);
            Console.Read();
        }
Пример #2
0
 public EventListener(CalculateWithEvent calculateCase)
 {
     CalculateCase            = calculateCase;
     CalculateCase.Calculate += new CalculateEventHandler(CalculateCase_Calculate);
 }