title: How do I find out if an object can be Invoke()'d?
body: <p>Consider the following class:</p>
  
  <pre><code>public class Event&lt;T&gt;
  {
      public delegate void Handler&lt;t&gt;(t msg);
      private event Handler&lt;T&gt; E;
  
      public void connect(Delegate handler) {
          E += delegate(T msg) {
              object target = handler.Target;
  
              if (Invokable(target) {
                  target.BeginInvoke(handler, new object[] { msg });
              }
          };
  
      }
  
      public void emit(T msg) {
          if ( E != null ) {
              E(msg);
          }
      }
  
      private static bool Invokable(object o) {
                  // magic
      }
  }
  </code></pre>
  
  <p>How do I implement <code>Invokable()</code>, and what else do I need for this code to compile? The only other problem that I know of is the <code>target.BeginInvoke</code> call, since target is <code>object</code>.</p>