如果我键入 Enter,如何在 MultiLine 文本框中将最后一行文本串起来
How to I string the Last Line text in MultiLine text box if I key the Enter
如果我按回车键,请告诉我如何在多行文本中串最后一行文本?
private void textBox1_KeyDown(object sender, KeyEventArgs e){ if (e.KeyCode == Keys.Enter){ string sor = ...}
在多行文本框中查找最后一行的方法如下:
if(textbox1.Lines.Length>0){
string lastLine = textbox1.Lines[textbox1.Lines.Length-1];
//put more code here
}
如果我按回车键,请告诉我如何在多行文本中串最后一行文本?
private void textBox1_KeyDown(object sender, KeyEventArgs e){ if (e.KeyCode == Keys.Enter){ string sor = ...}
在多行文本框中查找最后一行的方法如下:
if(textbox1.Lines.Length>0){
string lastLine = textbox1.Lines[textbox1.Lines.Length-1];
//put more code here
}