title: Can I customize automatic event handler generation in Visual Studio?
body: <p>When you subscribe to an event in code, Visual Studio automatically completes the code after <code>+=</code> and generates the appropriate event handler:</p>
  
  <pre><code>button.Click += new EventHandler(button_Click);
  //              ↑_____auto generated code_____↑
  </code></pre>
  
  <p>Notice how it explicitly creates the delegate instance: even though method groups are implicitly convertible to delegates since C# 2, the IDE behavior still hasn't changed in VS2010.</p>
  
  <p>So I'd like to know, is there a way to generate code like this instead?</p>
  
  <pre><code>button.Click += button_Click;
  </code></pre>
  
  <hr>
  
  <p>EDIT<br>
  just to make things clear to everyone: the code above is <em>not</em> in a designer file (I wouldn't care which syntax is used if it was the case). It's the snippet that is triggered when you type <code>+=</code> after an event name and press <kbd>TAB</kbd></p>
  
  <hr>
  
  <p>EDIT2<br>
  I reported this as a <a href="https://connect.microsoft.com/VisualStudio/feedback/details/632300/auto-generated-event-handlers-should-use-implicit-conversion-of-method-group-to-delegate" rel="noreferrer">suggestion on Connect</a>, you can vote for it if you also want the current behavior to be changed</p>