title: Check compatibility of a method with a given Delegate?
body: <p>In C# code, how do I check if a given method can be represented by a particular delegate type? </p>
  
  <p>I first tried something, based on my Type knowledge, along the lines of:</p>
  
  <pre><code>// The delegate to test against.
  void TargetDelegate(string msg);
  
  // and...
  var methodInfo = Type.GetMethod(..);  // obtain the MethodInfo instance. 
  // try to test it 
  typeof(TargetDelegate).IsAssignableFrom(methodInfo.GetType());
  </code></pre>
  
  <p>but that deals with only Types and not methods - it will always be false.</p>
  
  <p>My inclination is to believe the answer lies in the <a href="http://msdn.microsoft.com/en-us/library/system.delegate.aspx" rel="noreferrer"><code>Delegate</code></a> Type, but I'm just wandering around the FCL at this point. Any help would be appreciated. </p>