PropertyDescriptor.GetInvocationTarget(Type, Object) 方法

定義

這個方法會傳回應該在成員的引動過程使用的物件。

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

參數

type
Type

引動目標的 Type

instance
Object

可能的引動目標。

傳回

Object,應該在成員的引動過程使用。

備註

一般而言,傳回值會與 instance 傳入的 相同。 如果有人與這個實例建立另一個對象關聯,或實例是自定義類型描述元, GetInvocationTarget 則方法可能會傳回不同的值。

適用於