title: Local Reference to EventHandler Before Invocation
body: <p>What's the reasoning behind copying a event handler to a local variable before invoking it? Resharper does this when creating a invocator, and I remember looking at a code sample on CodeProject that does this.</p>
  
  <p>Code:</p>
  
  <pre><code>  public class MyObject
    {
      public event EventHandler SomethingHappened;
  
      protected virtual void OnSomethingHappened()
      {
        var handler = SomethingHappened; // Why this?
        if (handler != null)
          handler(this, EventArgs.Empty);
      }
    }
  </code></pre>