string[] lines = txtSql.Lines;
for (int i = 0; i < lines.Length; i++)
{
lines[i] = comboBox1.Text + lines[i];
}
txtSql.Lines = lines;
必须这样做,如下方法行不通:
for (int i = 0; i < txtSql.Lines.Length; i++)