static void MainEvent() { var eventRaiser = new ClassThatRaisesEvent(); var eventHandler = new ClassThatHandlesEvent(eventRaiser); eventRaiser.SimulateEvent(); }
public ClassThatHandlesEvent(ClassThatRaisesEvent eventRaiser) { eventRaiser.SomeEvent += new CustomEventHandler(HandleEvent); }