//声明数组,把 textbox1按行读取到数组里面去
string[] temptext = textBox1.Text.Replace("\r\n", ",").Split(',');
//你要在第几行前面加什么内容,就改第几行的数组元素,注意数组是从0开始的
temptext[1] = "the second line"+temptext[1];
//清空textbox1
textBox1.Clear();
//重新把修改后的内容写入textbox
foreach (string i in temptext)
{
textBox1.Text += i + "\r\n";
}
//完毕
textbox1.Text="
"+"The second line";