If I have this function:

void f(int x);

then binding to it is easy:

MethodInfo m = typeof(MyClass).GetMethod("f", new Type {typeof(Int32)});


However if I change it to this:

void f(ref int x);

I can't very well say:

MethodInfo m = typeof(MyClass).GetMethod("f", new Type
{typeof(Int32&)});

So far all the only way I see to do this is to loop over each function
matching the name "f" and then see if it has a single parameter and then
getting parameterInfo for it and testing to see if it has TypeIsRef set
and does not have IsOut set.

Given a Type T, can you get a Type object representing type T& ?


Jason

Reply via email to