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 可能會回傳不同的值。

適用於