Is there a benefit to explicit use of "new EventHandler" declaration?
.net, c#
Solution
In C# 1.0 you had no choice but to explicitly define the delegate type and the target.
Since C# 2.0 the compiler allows you to express yourself in a more succinct manner by means of an implicit conversion from a method group to a compatible delegate type. It's really just syntactic sugar.
Sometimes you have no choice but to use the long-winded syntax if the correct overload cannot be resolved from the method group due to an ambiguity.
Problem
In assigning event handlers to something like a context `MenuItem`, for instance, there are two acceptable syntaxes: ``` MenuItem item = new MenuItem("Open Image", btnOpenImage_Click); ``` ...and... ``` MenuItem item = new MenuItem("Open Image", new EventHandler(btnOpenImage_Click)); ``` I also note that the same appears to apply to this: ``` listView.ItemClick += listView_ItemClick; ``` ...and... ``` listView.ItemClick += new ItemClickEventHandler(listView_ItemClick); ``` Is there any particular advantage for the second (explicit) over the first? Or is this more of a stylistic question?