3 Comments

  • Cool!



    You can also save on creating a new EventArgs object each time an event is fired by using the EventArgs.Empty object.

  • EventArgs.Empty probably should do a thread check and return a single eventargs instance per thread... I wonder how this would affect performance?



    Or sacrifice the per thread check and EventArgs becomes an AppDomain singleton, maybe eases the GC a little, hmmm...

  • Eric,



    EventArgs.Empty follows the Null Object pattern and is a static readonly immutable object so inherently thread-safe. Guid and String use the same pattern.

Comments have been disabled for this content.