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,这是要分配给现有委托的新值。

适用于