Mono Class Library: System.Delegate Overview | Members

System.Delegate.DynamicInvoke Method

Causes a delegate to invoke the methods in its invocation list using the specified arguments.

public object DynamicInvoke (params object[] args)

Parameters

args
An array of object instances that are to be passed to the methods in the invocation list of the current instance. Specify null if the methods invoked by the current instance do not take arguments.

Returns

The object returned by the last method in the invocation list of the current instance.

Exceptions

TypeReason
ArgumentExceptionThe type of one or more elements in args is invalid as a parameter to the methods implemented by the current instance.
MethodAccessException

The caller does not have the required permissions.

-or-

The number, order or type of parameters listed in args is invalid.

System.Reflection.TargetException

A method in the invocation list of the current instance is an instance method and its target object is null.

-or-

A method in the invocation list of the current instance was invoked on a target object or a class that does not implement it.

!:System.Reflection.TargetParamterCountException The number of elements in args is not equal to the number of parameters required by the methods invoked by the current instance.
System.Reflection.TargetInvocationExceptionA method in the invocation list of the current instance threw an exception.

Remarks

Documentation for this section has not yet been entered.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0