title: C# event and delegate
body: <p>I want to detach the custom event but could not detach. Below I am using <code>-=</code> to detach the event. I assume after this, the <code>TextChanged2</code> method should not be invoked as I have unregistered the event. Is my understanding wrong?</p>
  
  <pre><code>public delegate void TextChangedEventHandler1(object sender, TextBoxargs ta);
  public event TextChangedEventHandler1 TextChanged1;
  private void textBox1_TextChanged(object sender, EventArgs e)
  {
      this.TextChanged1 -= new  TextChangedEventHandler1(TextChanged2);
      TextChanged2(sender, e);
  }
  
  public void TextChanged2(object sender, EventArgs e)
  {
      textBox1.Text = textBox1.Text.ToUpper();
  }
  </code></pre>