Invokes the method, represented by the Delegate, dynamically (late-bound).
[Visual Basic] Public Function DynamicInvoke( _ ByVal args() As Object _ ) As Object [C#] public object DynamicInvoke( object[] args ); [C++] public: Object* DynamicInvoke( Object* args[] ); [JScript] public function DynamicInvoke( args : Object[] ) : Object;
-or-
a null reference (in Visual Basic Nothing), if the method represented by the Delegate does not require arguments.
The Object returned by the method represented by the Delegate.
Exception Type | Condition |
---|---|
AccessException | The caller does not have access to the method represented by the Delegate; for instance, if the method is private.
-or- The number, order or type of parameters listed in args is invalid. |
TargetException | The method represented by the Delegate is an instance method and the target object is a null reference (Nothing).
-or- The method represented by the Delegate is invoked on an object or a class that does not support it. (?) |
TargetInvocationException | One of the encapsulated methods throws an exception. (?) |
This method calls the DynamicInvokeImpl method.
Delegate Class | Delegate Members | System Namespace | DynamicInvokeImpl | Object