語言

ServiceManager.GetTarget(Delegate) 方法

定義

傳回委派之目標對象的協助程式方法。 如果委派已建立為 Proxy 泛型委派,則這會正確地傳回原始物件,而不是 Proxy。

protected:
 static System::Object ^ GetTarget(Delegate ^ callback);
protected static object GetTarget(Delegate callback);
static member GetTarget : Delegate -> obj
Protected Shared Function GetTarget (callback As Delegate) As Object

參數

callback
Delegate

代表要達成目標。

傳回

返回 Object,即回調目標。 若回調代表靜態物件,則可返回 null 此值。

例外狀況

callback 是 null。

適用於