Both are exactly the same. But
Object.Event += EventHandler; Object.Event -= EventHandler;
The above example compiles only in version 3.0 or later of C #, whereas if you are in version 2.0 or before you can only use the following construction.
Object.Event += new System.EventHandler(EventHandler); Object.Event -= new System.EventHandler(EventHandler);
See more at Enter Output . search "Output Type"
source share