I have the MethodInfo
of a method on a class type that is part of an interface definition that that class implements.
How can I retrieve the matching MethodInfo
object of the method on the interface type that the class implements ?
I think i found the best way to do this :
var methodParameterTypes = classMethod.GetParameters().Select(p => p.ParameterType).ToArray();
MethodInfo interfaceMethodInfo = interfaceType.GetMethod(classMethod.Name, methodParameterTypes);