MemberDescriptor.GetInvocationTarget(Type, Object) 方法

定義

擷取應該在成員的引動過程使用的物件。

protected:
 virtual System::Object ^ GetInvocationTarget(Type ^ type, System::Object ^ instance);
protected virtual object GetInvocationTarget (Type type, object instance);
protected virtual object? GetInvocationTarget (Type type, object instance);
abstract member GetInvocationTarget : Type * obj -> obj
override this.GetInvocationTarget : Type * obj -> obj
Protected Overridable Function GetInvocationTarget (type As Type, instance As Object) As Object

參數

type
Type

引動目標的 Type

instance
Object

可能的引動目標。

傳回

要在引動成員過程使用的物件。

例外狀況

typeinstancenull

備註

一般而言,傳回值會與 instance 參數相同。 如果另一個對象已經與此實例相關聯,或者如果實例是自定義類型描述元,則 GetInvocationTarget 方法可能會傳回不同的值。

適用於