How do I fire an event safely
When there are no subscribers to an event how do I ensure that an exception will not be thrown if the event is fired. // Delegate declaration public delegate void _delDisplayChange(object sender,string option); // Event declaration public event _delDisplayChange DisplayChange; //throwing the event DisplayChange(this, "DISTRIBUTION"); Here is the recommended way to do it: protected void RaiseDisplayChanged(string message) { var handlers = DisplayChange; if(handlers != null) handlers(this, message); } Copying the event handlers enumeration before checking does two things: If DisplayChange