一个帮助器方法,该方法执行 Delegate.Remove,但知道如何给作为泛型回调代理的委托解包。
命名空间:  Microsoft.Windows.Design
程序集:  Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Protected Shared Function RemoveCallback ( _
    existing As Delegate, _
    toRemove As Delegate _
) As Delegate
protected static Delegate RemoveCallback(
    Delegate existing,
    Delegate toRemove
)
protected:
static Delegate^ RemoveCallback(
    Delegate^ existing, 
    Delegate^ toRemove
)
static member RemoveCallback : 
        existing:Delegate * 
        toRemove:Delegate -> Delegate 
protected static function RemoveCallback(
    existing : Delegate, 
    toRemove : Delegate
) : Delegate
参数
- existing
 类型:System.Delegate
 现有的委托。
- toRemove
 类型:System.Delegate
 要从 existing 中移除的委托。
返回值
类型:System.Delegate
应指派给 existing 的新委托。
备注
使用 Unsubscribe 实现中的 RemoveCallback。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
请参见
参考
SubscribeContextCallback<TContextItemType>