Configure VS 2010 so that it doesn't add new EventHandler(...); when adding an EventHandler via += [duplicate]
开发者_高级运维Possible Duplicate:
Can I customize automatic event handler generation in Visual Studio ?
Can I configure VS2010 Intellisense so that it does this:
SomeEvent += Some_Method;
instead of this:
SomeEvent += new EventHandler(Some_Method);
when adding an EventHandler via += and pressing the Shift key?
I understand that this doesn't make any difference as far as the generated IL is concerned but I personally much prefer the first version. It is easier to read and I don't have to go and fix the += / -= calls when I go and change the EventHandler type to something different.
Nope, sorry. I just go with the default behavior and then delete the extra fluff after it's stubbed out the method for me.
精彩评论