samedi 27 juin 2015

What Types should be in the Type array for Type.GetMethod when a parameter is generic?

If I want to call a generic method through reflection, I can easily use this technique, unless:

  1. The method can only be distinguished from another by its parameters.
  2. The method has a parameter that's type is one of the method's type parameters.

How do I specify a generic parameter in the Type[] array when calling Type.GetMethod(string, Type[])?





Aucun commentaire:

Enregistrer un commentaire