I am trying to get a MethodInfo object for a method on a type with an out param in its signature. Something to the effect of this:
MethodInfo tryParse = typeof(T).GetMethod(
"TryParse",
BindingFlags.Public|BindingFlags.Static,
null,
new Type[] { typeof(string), typeof(T) },
null);
But the problem is, it doesn't find it because the type of the second parameter is not simply T but out T. When I debug through and use typeof(T).GetMethods() I can see the actual MethodInfo that I want and the ParameterInfo object is either of type T& or T ByRef, but I can't see how to create the Type that represents this from typeof(T).
Any ideas?