title: What Types should be in the Type array for Type.GetMethod when a parameter is generic?
body: <p>If I want to call a generic method through reflection, I can easily use <a href="https://stackoverflow.com/questions/232535/how-to-use-reflection-to-call-generic-method">this</a> technique, unless:</p>
  
  <ol>
  <li>The method can only be distinguished from another by its parameters.</li>
  <li>The method has a parameter that's type is one of the method's type parameters.</li>
  </ol>
  
  <p>How do I specify a generic parameter in the <code>Type[]</code> array when calling <code>Type.GetMethod(string, Type[])</code>?</p>
  
  <p>Example:</p>
  
  <pre><code>public class Example
  {
      //This is the one I want to call.
      public void DoSomething&lt;T&gt;(T t) { ... }
  
      public void DoSomething(Foo foo) { ... }
  
      public void CallDoSomething(Type type, object value)
      {
          MethodInfo method = typeof(Example)
          .GetMethod("DoSomething", new Type[] {/* what do i put here? */ });
  
          MethodInfo generic = method.MakeGenericMethod(type);
          generic.Invoke(this, value);
      }
  </code></pre>