title: Subscribe to base class event from derived class
body: <p>I have been struggling to subscribe to a base class event from a derived class. The purpose is to raise the event in my base class every time i get a propertychanged and consequently run a method in my derived class. Here is a reduced version of my code:</p>
  
  <pre><code>namespace MyNamespace
  {
  public delegate void EventHandler();
  [Serializable]
  public class ChartGroupCollection : ObservableCollection&lt;ChartGroup&gt;, INotifyCollectionChanged
  {
  
      public ChartGroupCollection()
      {
         base.DirtyFlagging += new EventHandler(MethodIWantToRun); //subscription to event
      }
  
      void MethodIWantToRun()
      {
          SomeVariable++;
      }
  
  
      #region NotifyPropertyChanged
      public event PropertyChangedEventHandler PropertyChanged;
      private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
      {
          PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
      }
      #endregion
  }
  
  
  [Serializable]
  public class ChartGroup : INotifyPropertyChanged
  {
      public event EventHandler&lt;EventArgs&gt; DirtyFlagging;
      protected virtual void OnDirtyFlagging(EventArgs e)
      {
          EventHandler&lt;EventArgs&gt; handler = DirtyFlagging;
          if (handler != null)
          {
              handler(this, e);
          }
      }
  
  
      public ChartGroup()
      {
  
      }
  
      public event PropertyChangedEventHandler PropertyChanged;
      private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
      {
          if (PropertyChanged != null)
          {
              DirtyFlagging.Invoke(this, someeventargs);  //Where i want to invoke the event
              PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
          }
      }
  
  
  }
  </code></pre>