简化委托调用


// 调用
1
 public event TcpSend Send;

// 定义
2 public delegate void TcpSend(Object sender, ref object o, ref bool b);

原形

1   if (Send != null)
2   Send(this, ref s.obj, ref bSend);

简化

1   Send?.Invoke(this, ref s.obj, ref bSend);
原文地址:https://www.cnblogs.com/endv/p/6090671.html