title: In C# why can't I pass another class' EventHandler reference and how can I get around it?
body: <p>If I have ClassA that has a public event, SomeEvent, and ClassC that has method, addListener, that accepts an EventHandler reference, why can't ClassB have a line that says c.addListener(ref a.SomeEvent)?  If I try I get a compiler error that says: "The event 'ClassA.SomeEvent' can only appear on the left hand side of += or -= (except when used from within the type 'ClassA').</p>
  
  <p>Why does this restriction exist?  And how can I get around it while staying reasonably close to my structure? </p>
  
  <p>I'm a C# newbie; any help would be appreciated.  Thanks!</p>
  
  <pre><code>class ClassA {
      public event EventHandler SomeEvent;
  }
  
  ClassB{
      public ClassB() {
  
          ClassA a = new ClassA();
          ClassC c = new ClassC();
          c.addListener(ref a.SomeEvent);  //Compile error
      }
  }
  
  class ClassC {
      public void addListener(ref EventHandler handler) {
          handler += onEvent;
      }
  
      private void onEvent(object sender, EventArgs e) {
          //do stuff
      }
  
  }
  </code></pre>