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

定義

每當呼叫產生代理型態上的任何方法時,都會呼叫此方法來派遣控制。

protected:
 abstract System::Object ^ Invoke(System::Reflection::MethodInfo ^ targetMethod, cli::array <System::Object ^> ^ args);
protected abstract object Invoke(System.Reflection.MethodInfo targetMethod, 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

打電話者所說的方法。

args
Object[]

呼叫者傳給方法的參數。

傳回

物件要回傳給呼叫者,或 null 用於 void 方法。

適用於