c# - Sender of static EventHandler event -


i have class static eventhandler event:

public static event eventhandler myevent;  static void raiseevent() {     eventhandler p = myevent;      if (p != null)     {         p(null, eventargs.empty);     } } 

since don't have this object can used event sender, raise event sender = null. ok have parameter set null, according .net programming guidelines? if not, object can use sender?

event design

on static events, sender parameter should null.

source: http://msdn.microsoft.com/en-us/library/vstudio/ms229011%28v=vs.100%29.aspx


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -