public event EventHandler<EventArgs> MyEvent = delegate{};
有人可以解释一下如果没有它,这与定义它有何不同?是否要在提升事件时避免检查null?
public void DoSomething() { if (MyEvent != null) // Unnecessary! MyEvent(this,"foo"); }