With C# 6 and above, code could be simplified using new ?.
operator as in:
TheEvent?.Invoke(this, EventArgs.Empty);
Here is the MSDN documentation.
With C# 6 and above, code could be simplified using new ?.
operator as in:
TheEvent?.Invoke(this, EventArgs.Empty);
Here is the MSDN documentation.