[quoted text, click to view] > I have a class (called CTestClass) within which I have a method
>(Foo). This method has the following signature:
>
> Foo(int x, int y, ref int z)
>
> I am attempting to use reflection to invoke this method but before
>doing that I want to use Type.GetMethod to bind to it and validate
>it's signature. The problem is this binding fails due to the ref
>parameter.
The following should work for that signature
Type[] paramTypes = new Type[] {typeof(int), typeof(int),
Type.GetType("System.Int32&")};
MethodInfo mi = typeof(CTestClass).GetMethod( "Foo", paramTypes );
I don't think ParameterModifier will help you here.
Mattias
--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/