MethodAccessorInvoke Method
The
Invoke(Object, Object) overload can be used for any number of parameters or for methods
with
ref/
parameters. The other non-generic overloads can be used for methods with no more than four parameters.
If you know the parameter types at compile time (and the return type for function methods), then you can use
the
InvokeStaticAction/
InvokeStaticFunction
methods for the best performance to invoke static methods. If you know also the instance type, then
the
InvokeInstanceAction/
InvokeInstanceFunction
methods can be used for the best performance to invoke instance methods.
Invoke(Object) |
Invokes the method with no parameters. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
See the Remarks section of the Invoke(Object, Object) overload for details.
|
Invoke(Object, Object) |
Invokes the method with one parameter. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
See the Remarks section of the Invoke(Object, Object) overload for details.
|
Invoke(Object, Object) |
Invokes the method. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
|
Invoke(Object, Object, Object) |
Invokes the method with two parameters. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
See the Remarks section of the Invoke(Object, Object) overload for details.
|
Invoke(Object, Object, Object, Object) |
Invokes the method with three parameters. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
See the Remarks section of the Invoke(Object, Object) overload for details.
|
Invoke(Object, Object, Object, Object, Object) |
Invokes the method with four parameters. The return value of void methods is always .
For static methods the instance parameter is omitted (can be ).
See the Remarks section of the Invoke(Object, Object) overload for details.
|