ServiceManager.RemoveCallback(Delegate, Delegate) 方法

定义

一个帮助器方法,该方法执行 Delegate.Remove 操作,并对作为泛型回调代理的委托进行解包。 您应在 Unsubscribe 实现中使用此方法。

protected:
 static Delegate ^ RemoveCallback(Delegate ^ existing, Delegate ^ toRemove);
protected static Delegate RemoveCallback (Delegate existing, Delegate toRemove);
static member RemoveCallback : Delegate * Delegate -> Delegate
Protected Shared Function RemoveCallback (existing As Delegate, toRemove As Delegate) As Delegate

参数

existing
Delegate

要从中移除回调的现有委托。

toRemove
Delegate

要移除的回调。

返回

返回 Delegate,这是要分配给现有委托的新值。

适用于