title: How to call a generic extension method with reflection?
body: <p>I wrote the extension method <code>GenericExtension</code>. Now I want to call the extension method <code>Extension</code>. But the value of <code>methodInfo</code> is always null.</p>
  
  <pre><code>public static class MyClass
  {
      public static void GenericExtension&lt;T&gt;(this Form a, string b) where T : Form
      {
          // code...
      }
  
      public static void Extension(this Form a, string b, Type c)
      {
          MethodInfo methodInfo = typeof(Form).GetMethod("GenericExtension", new[] { typeof(string) });
          MethodInfo methodInfoGeneric = methodInfo.MakeGenericMethod(new[] { c });
          methodInfoGeneric.Invoke(a, new object[] { a, b });
      }
  
      private static void Main(string[] args)
      {
          new Form().Extension("", typeof (int));
      }
  }
  </code></pre>
  
  <p>Whats wrong?</p>