title: Passing EventHandler between several classes
body: <p>I am creating a gui widget a dll library, a class that derives from a FORM (I thought about usercontrol but it doesn't have built in properties like Opacity and some more that i need).  </p>
  
  <p>Because I don't want to expose to the user of this control all the standard methods and propertis that this derived class will inherit, I've created a nothe class "middle-man"  that should encapsulate and expose only the needed methos to the user of this dll.<br>
  The problem is exposing the events. </p>
  
  <p>This is an abstract example:</p>
  
  <pre><code> class Class1
      {
          Class2 theClass2;
          public Class1()
          {
              theClass2 = new Class2();
              theClass2. += new EventHandler(theClass3_EventHandler);
              theClass2.TriggerEvent();
          }
  
          void theClass3_EventHandler(object sender, EventArgs e)
          {
              throw new NotImplementedException();
          }
  
      }
  
      class Class2
      {
          Class3 theClass3;
  
  
          public Class2()
          {
              theClass3 = new Class3();
  
          }
  
          public void TriggerEvent()
          {
              theClass3.Trigger();
          }
  
  
          class Class3
          {
              public event EventHandler theEvent;
  
              public void Trigger()
              {
                  if (this.theEvent != null)
                      theEvent(this, new EventArgs());
              }
  
  
          }
      }
  </code></pre>