Export (0) Print
Expand All

Delegate.DynamicInvokeImpl Method

Dynamically invokes (late-bound) the method represented by the current delegate.

[Visual Basic]
Protected Overridable Function DynamicInvokeImpl( _
   ByVal args() As Object _
) As Object
[C#]
protected virtual object DynamicInvokeImpl(
 object[] args
);
[C++]
protected: virtual Object* DynamicInvokeImpl(
 Object* args __gc[]
);
[JScript]
protected function DynamicInvokeImpl(
   args : Object[]
) : Object;

Parameters

args
An array of objects that are the arguments to pass to the method represented by the current delegate.

-or-

A null reference (Nothing in Visual Basic), if the method represented by the current delegate does not require arguments.

Return Value

The object returned by the method represented by the delegate.

Exceptions

Exception Type Condition
MemberAccessException The caller does not have access to the method represented by the delegate (for example, 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 in Visual Basic).

-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.

Remarks

This method implements the DynamicInvoke method.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Delegate Class | Delegate Members | System Namespace | DynamicInvoke | Object

Show:
© 2014 Microsoft