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

             eventRaiser.SimulateEvent();
        }
Exemple #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);
 }
Exemple #4
0
 public ClassThatHandlesEvent(ClassThatRaisesEvent eventRaiser)
 {
     eventRaiser.SomeEvent +=
         new EventHandler <CustomEventArgs>(HandleEvent);
 }