+,+=,--,-=等运算符就不说了。
1.组合委托Combine静态方法
public static Delegate Combine(Delegate[])
public static Delegate Combine(Delegate,Delegate)
不同的继承,注意显式转换。
2.Remove方法
public static Delegate Remove(Delegate source,Delegate value)
注意:Combine抑或Remove都会返回一个新构造的委托对象【委托链】,Remove后调用委托时注意检查null。
3.GetInvocationList方法
public static Delegate[] GetInvocationList();
返回组合委托的(单播)委托数组列表。
代码示例
相关文章: