Assigning Text to a TextBox in code (programatically) ... if you've called the 'Focus method of the TextBox ... does not move the current insertion point in the TextBox to the end of the inserted Text as one might expect. The insertion point is set to the beginning of the assigned Text.
So, after your paste, when you press 'Enter, you'll insert a blank line.
I suspect you are doing something like this:
private void button1_Click(object sender, System.EventArgs e)
{
textBox1.Focus();
textBox1.Text = "Line1" + System.Environment.NewLine + "Line2" + System.Environment.NewLine + "Line3";
}
Yes, that will result in an empty line if you press Enter after that.
If you do this:
private void button1_Click(object sender, System.EventArgs e)
{
textBox1.Text = "Line1" + System.Environment.NewLine + "Line2" + System.Environment.NewLine + "Line3";
textBox1.SelectionStart = textBox1.Text.Length;
}
Observe what happens :)
To further your understanding I suggest you only assign the Text in the Button Click event ... now you will have to click on the TextBox to start typing in it, and the insertion point will be set where you click, but, sometimes the resulting location of the insertion point may not be what you expect.
Observe, experiment, analyze, deduce: repeat :)