Style question.
The C# 1.0 way to subscribe to an event is to use an explicit encapsulating delegate:
publisher.RaiseCustomEvent += new CustomEventHandler(HandleCustomEvent);
In C# 2.0 they added a simpler syntax:
publisher.RaiseCustomEvent += HandleCustomEvent;
In Visual Studio 2010 (tested with a .NET 3.5 project) typing
"myObject.SomeEvent +="
brings up the option to hit tab to fill in the explicit delegate. Furthermore, code created with the WinForms designer always uses explicit delegates.
I understand the value in being explicit, but not at the sacrifice of readability. Given that the new syntax is much simpler/cleaner/readable and has been around since 2006, why does Visual Studio push you so hard into using the old syntax? Is it still the preferred syntax?