DispatchProxy.Invoke(MethodInfo, Object[]) 方法

定义

每当对生成的代理类型调用任何方法时,都会调用此方法来调度控件。Whenever any method on the generated proxy type is called, this method is invoked to dispatch control.

protected:
 abstract System::Object ^ Invoke(System::Reflection::MethodInfo ^ targetMethod, cli::array <System::Object ^> ^ args);
protected abstract object Invoke (System.Reflection.MethodInfo targetMethod, object[] args);
abstract member Invoke : System.Reflection.MethodInfo * obj[] -> obj
Protected MustOverride Function Invoke (targetMethod As MethodInfo, args As Object()) As Object

参数

targetMethod
MethodInfo

调用方调用的方法。The method the caller invoked.

args
Object[]

调用方传递给方法的参数。The arguments the caller passed to the method.

返回

要返回调用方的对象,或 void 方法的 nullThe object to return to the caller, or null for void methods.

适用于