MemberDescriptor.GetInvocationTarget(Type, Object) Metode

Definisi

Mengambil objek yang harus digunakan selama pemanggilan anggota.

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

Parameter

type
Type

Target Type pemanggilan.

instance
Object

Target pemanggilan potensial.

Mengembalikan

Objek yang akan digunakan selama pemanggilan anggota.

Pengecualian

type atau instance adalah null.

Keterangan

Biasanya, nilai yang dikembalikan akan sama dengan instance parameter . Jika objek lain telah dikaitkan dengan instans ini, atau jika instans adalah deskriptor jenis kustom, GetInvocationTarget metode dapat mengembalikan nilai yang berbeda.

Berlaku untuk