Can somebody explain why the .Net framework team decided that a delegate without subscribers should be null instead of an object with an empty InvocationList? I'd like to know the rationale that led to this decision.
void DoSomething()
{
EventHandler handler = SomeEvent;
if(handler != null) //why is this null-check necessary?
{
handler(this, EventArgs.Empty);
}
}
Thanks