DoubleOp objTest = new DoubleOp(MathOperations.MultiplyByTwo);
objTest += new DoubleOp(MathOperations.Square);
以上两行代码等价于如下代码:
DoubleOp A = new DoubleOp(MathOperations.MultiplyByTwo);
DoubleOp B = new DoubleOp(MathOperations.Square);
DoubleOp objTest = A + B;
委托可以相加,也可以相减
多点委托的最终返回值是最后一个方法的返回值