title: Visual C# GUI Designer - Recommended way of removing generated event handler-code
body: <p>I'm new to the Visual C# designer so these are general and pretty basic question on how to work with the designer.</p>
  
  <p>When we for instance add a label to a form and then double-click on it in the Visual C# designer (I'm using Microsoft Visual C# 2008 Express Edition), the following things happen:</p>
  
  <ol>
  <li>The designer generates code within <strong>Form1.Designer.cs</strong> (assume default names for simplicity) to add the label, </li>
  <li><p>then with the double-click it will add the event handler label1_Click to the label within <strong>Form1.Designer.cs</strong>, using the following code </p>
  
  <p>this.label1.Click += new System.EventHandler(this.label1_Click);</p></li>
  </ol>
  
  <p>and it adds the event handler method to <strong>Form1.cs</strong></p>
  
  <pre><code>private void label1_Click(object sender, EventArgs e)
  {
  
  }
  </code></pre>
  
  <p>If I now remove the label only the code within Form1.Designer.cs will be removed but the label1_Click method will stay within Form1.cs even if it isn't used by anything else. But if I'm using reset within Properties->Events for the Click-event from within the designer even the label1_Click method in Form1.cs will be removed.  </p>
  
  <p>1.) Isn't that a little inconsistent behavior?</p>
  
  <p>2.) What is the recommended way of removing such generated event handler-code?</p>
  
  <p>3.) What is the best "mental approach"/best practice for using the designer? </p>
  
  <p>I would approach it by mental separation in the way that Form1.cs is 100% my responsibility and that on the other hand I'm not touching the code in Form1.Designer.cs at all. Does that make sense or not? Since sometimes the designer removes sth. from Form1.cs I'm not sure about this.</p>