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

定義

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

C#
protected abstract object Invoke (System.Reflection.MethodInfo targetMethod, object[] args);
C#
protected abstract object? Invoke (System.Reflection.MethodInfo? targetMethod, object?[]? args);

參數

targetMethod
MethodInfo

呼叫者叫用的方法。

args
Object[]

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

傳回

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

適用於

產品 版本
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Standard 2.1
UWP 10.0