title: How to delete selected text from textbox in c#(SWF)
body: <p>I try to do a notepad in c#,
  I have some problems at delete function,
  I want to delete selected text...</p>
  
  <pre><code>private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
  {       
      int a;
      a = textBox1.SelectionLength;
      textBox1.Text.Remove(textBox1.SelectionStart,a);
  }
  </code></pre>
  
  <p>what is wrong?</p>