DispatchProxy.Invoke(MethodInfo, Object[]) 方法
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當呼叫所產生之 Proxy 型別上的任何方法時,會叫用此方法以分派控制。
protected:
abstract System::Object ^ Invoke(System::Reflection::MethodInfo ^ targetMethod, cli::array <System::Object ^> ^ args);
C#
protected abstract object Invoke (System.Reflection.MethodInfo targetMethod, object[] args);
C#
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
。
產品 | 版本 |
---|---|
.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 |