Suppose I have two methods in a class:
class Foo
{
public void Convert(string s, int x){ }
public void Convert(string s, double x) { }
}
If I use:
var method = typeof (Foo)
.GetMethod("Convert", new[] {typeof (string), typeof (int)});
I get the correct method. But if I change xand make it a parameter outin the first method:
public void Convert(string s, out int x) { }
Then I get the second method Convert(string s, double x).

I don’t understand why it does not return the first method, or at least nullinstead of the second? The signature of the second method does not match the types that I provide. How can I get the correct method in the second case? Is there any way to get this straight? I know that I can get all the methods and then filter them based on parameter types, but I think there should be a direct way to do this, and I will skip it ...