title: Method or Extension Method to Handle InvokeRequired
body: <p>I can't quite come up with the solution to creating a generic method to handle the <code>InvokeRequired</code> for void methods  (I'll deal with return values later).  I was thinking something like:</p>
  
  <pre><code>// Probably not the best name, any ideas? :)
  public static void CheckInvoke(this Control instance,
                                 ,Action&lt;object, object&gt; action)
  {
    if (instance.InvokeRequired)
    {
      instance.Invoke(new MethodInvoker(() =&gt; action));
    }
    else
    {
      action()
    }
  }
  </code></pre>
  
  <p>Then I could write something like:</p>
  
  <pre><code>public partial class MyForm : Form
  {
    private ThreadedClass c = new ThreadedClass();
  
    public MyForm()
    {
      c.ThreadedEvent += this.CheckInvoke(this
                                          ,this.MethodRequiresInvoke
                                          ,sender
                                          ,e);
    }
  }
  </code></pre>
  
  <p>This doesn't compile obviously, I just can't quite tie it together.</p>