I have class with static EventHandler
event:
public static event EventHandler MyEvent;
static void RaiseEvent()
{
EventHandler p = MyEvent;
if (p != null)
{
p(null, EventArgs.Empty);
}
}
Since I don't have any this
object which can be used as event sender, I raise this event with sender = null
. Is it OK to have this parameter set to null, according to .NET programming guidelines? If not, what object can I use as a sender?