title: Negative Aspects/Bad Practice of Static Event in C#
body: <p>I reuse the code below a lot when I create events that will be used in different areas of an application.  I find it really helpful and it makes events very easy to follow in the code.  Is there any reason why this could be a bad idea?  This is a bit broad, but basically is there a reason not to do this?</p>
  
  <p>Event classes:</p>
  
  <pre><code>public delegate void FocusEventHandler(object source, FocusEventArgs e);
  
  class FocusEvent
  {
      public static event FocusEventHandler focusEvent;
  
      public static void Focus(bool status)
      {
          focusEvent(null, new FocusEventArgs(status));
      }
  }
  
  public class FocusEventArgs : EventArgs
  {
      public bool Focused { get; set; }
  
      public FocusEventArgs(bool f)
      {
          Focused = f;
      }
  }
  </code></pre>
  
  <p>So to fire the event, all I need is:</p>
  
  <pre><code>FocusEvent.Focus(false);
  </code></pre>
  
  <p>Thanks guys.  This helps a lot.  I really need to read up on memory usage.</p>