Saturday, November 23, 2013

Need help using GetMethod to find a method with generic parameter

"I must be doing something wrong when filtering for the List<TListType> list parameter."


And how are you filtering?


If you're trying to use something like GetMethod("testMethod", new[] { typeof(List<>) }) then that won't work. To get this to work you'd need to use GetMethods() and then lookup a method with which matches the name, is generic, has one generic argument and one parameter of the expected type.


No comments:

Post a Comment