static void Main()
        {
            ClassThatRaisesEvent eventRaiser = new ClassThatRaisesEvent();
             ClassThatHandlesEvent eventHandler =
            new ClassThatHandlesEvent(eventRaiser);

             eventRaiser.SimulateEvent();
        }
Example #2
0
        static void Main()
        {
            ClassThatRaisesEvent  eventRaiser  = new ClassThatRaisesEvent();
            ClassThatHandlesEvent eventHandler =
                new ClassThatHandlesEvent(eventRaiser);

            eventRaiser.SimulateEvent();
        }
 public ClassThatHandlesEvent(ClassThatRaisesEvent eventRaiser)
 {
     eventRaiser.SomeEvent +=
     new CustomEventHandler(HandleEvent);
 }
Example #4
0
 public ClassThatHandlesEvent(ClassThatRaisesEvent eventRaiser)
 {
     eventRaiser.SomeEvent +=
         new EventHandler <CustomEventArgs>(HandleEvent);
 }