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

定義

當呼叫所產生之 Proxy 型別上的任何方法時,會叫用此方法以分派控制。

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[]

呼叫者傳遞到方法的引數。

傳回

要傳回給呼叫者的物件,或針對 void 方法則為 null

適用於