title: Action T synchronous and asynchronous
body: <p>I have a ContextMenuStrip control that allows you to execute an action is two different flavors: <code>Sync</code> and <code>Async</code>.</p>
  
  <p>I am trying to cover everything using Generics so I did this:</p>
  
  <pre><code>public class BaseContextMenu&lt;T&gt; : IContextMenu
  {
     private T executor;
  
     public void Exec(Action&lt;T&gt; action)
     {
        action.Invoke(this.executor);
     }
  
     public void ExecAsync(Action&lt;T&gt; asyncAction)
     {
         // ...
     }
  </code></pre>
  
  <p>How I can write the async method in order to execute the generic action and 'do something' with the menu in the meanwhile?
  I saw that the signature of <code>BeginInvoke</code> is something like:</p>
  
  <pre><code>asyncAction.BeginInvoke(this.executor, IAsyncCallback, object);
  </code></pre>