Dynamically invokes (late-bound) the method represented by the current delegate.
[Visual Basic] Public Function DynamicInvoke( _ ByVal args() As Object _ ) As Object [C#] public object DynamicInvoke( object args ); [C++] public: Object* DynamicInvoke( Object* args __gc ); [JScript] public function DynamicInvoke( args : Object ) : Object;
- An array of objects that are the arguments to pass to the method represented by the current delegate.
A null reference (Nothing in Visual Basic), if the method represented by the current delegate does not require arguments.
The object returned by the method represented by the delegate.
|MemberAccessException||The caller does not have access to the method represented by the delegate (for example, if the method is private).
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 in Visual Basic).
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.
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard
.NET Framework Security:
- ReflectionPermission when invoked late-bound through mechanisms such as Type.InvokeMember. Associated enumeration: ReflectionPermissionFlag.MemberAccess