title: Implementing EventArgs Empty Correctly
body: <p>I'm trying to properly understand <code>Events</code> and <code>EventArgs</code> but can't quite get a handle on the whole <code>EventArgs.Empty</code> property.</p>
  
  <p><code>EventArgs</code> implements:</p>
  
  <pre><code>public static readonly EventArgs Empty;
  </code></pre>
  
  <p>and allows us to create an <code>EventHandler</code> and call it using:</p>
  
  <pre><code>public event EventHandler&lt;EventArgs&gt; TestHappening;
  
  private void MyMethod()
  {
      TestHappening( this, EventArgs.Empty );
  }
  </code></pre>
  
  <p>Now I've studied a number of classes based on <a href="https://msdn.microsoft.com/en-us/library/system.eventargs(v=vs.96).aspx#inheritanceContinued" rel="nofollow"><code>EventArgs</code></a> and none of them seem to implement this so I'm flying a little blind even though I've read all the documentation I could find regarding <a href="https://msdn.microsoft.com/query/dev12.query?appId=Dev12IDEF1&amp;l=EN-US&amp;k=k(System.EventArgs.Empty);k(TargetFrameworkMoniker-Silverlight,Version%3Dv5.0);k(DevLang-csharp)&amp;rd=true" rel="nofollow"><code>EventArgs.Empty</code></a>. According to the documentation, "The value of Empty is a read-only instance of EventArgs equivalent to the result of calling the EventArgs constructor".  </p>
  
  <p>Based on that I've created the following implementation:</p>
  
  <pre><code>public class TestEventArgs : EventArgs
  {
      public static readonly TestEventArgs Empty;
  
      public bool UpdatedValue { get; private set; }
  
      TestEventArgs()
          : this( false )
      {
      }
  
      public TestEventArgs( bool updatedValue )
      {
          this.UpdatedValue = updatedValue;
      }
  }
  
  public event EventHandler&lt;TestEventArgs&gt; TestHappening;
  
  private void MyMethod()
  {
      TestHappening( this, EventArgs.Empty );
  }
  </code></pre>
  
  <p>Is the use of <code>TestEventArgs.Empty</code> instancing a class or what exactly is it doing?</p>
  
  <p>Also, even though all the subclasses I checked didn't make use of <code>Empty</code>, they still have it available, isn't it confusing having an unusable property exposed?</p>
  
  <p>Lastly, based on the various documents I studied, there were two main variances of when to actually instantiate the <code>EventArgs</code>.  Which is considered "more" correct?:</p>
  
  <pre><code>OnTestHappening( new TestEventArgs( false ) );
  
  private void OnTestHappening( TestEventArgs e )
  {
      var handler = TestHappening;
  
      if ( handler != null )
          handler( this, e );
  }
  </code></pre>
  
  <p>vs</p>
  
  <pre><code>OnTestHappening( true );
  
  private void OnTestHappening( bool foo )
  {
      var handler = TestHappening;
  
      if ( handler != null )
          handler( this, new TestEventArgs( foo ) );
  }
  </code></pre>