   [.net] Reflection on unbound methods?
  I have a little bit of an odd problem. I have a MethodInfo instance for a method from an unbound generic type. Not a generic method itself:Type ListType = typeof(List<>);MethodInfo AddType = ListType.GetMethod("Add",/*Binding params for the public version*/);And I want to convert the MethodInfo I have into a MethodInfo for List<int>.Add. For generic types themselves you can use MakeGenericType and you get the bound type out. MethodInfo has a similar method, but it's only for generic methods; not methods of generic types. Is there a nice way of doing that, short of pulling the declaring type of the method, using MakeGenericType on it, and re-pulling the method? (hoping the name and binding params are right).NET 2.0 preferred, solutions with newer dependencies are okay.   
  I don't understand why you can't just MakeGenericType on ListType you have for List<> and then get the method info for Add on the modified ListType?   ;  Because I don't have the List in the actual code; only the MethodInfo generated by the sample above. Though after some independent research, it seems I'm going to need to go back to the List and re-acquire the MethodInfo with the bound params...   ;  Unfortunately, this does appear to be a hole in the reflection API. Fortunately, there is a way around having to worry about the method name and specific binding flags. Try this:  foreach (MethodBase iter in mb.DeclaringType.MakeGenericType(typeof(int)).GetMethods( BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy))  { if (iter.MetadataToken == mb.MetadataToken) {mb2 = iter;break; }  }Using the metadata token of the method will avoid any ambiguity with overloaded methods. I used the most inclusive bindings flags to make sure it's included in the search whatever it may be.   