C# 获取textbox行数
当textbox为多行时,获取它的行数:
int count = this.txtMsgInfo.Lines.GetUpperBound(0);
textbox显示定位到最后一行(最新一行)
this.textBox1.Select(this.txtMsgInfo.TextLength, 0);
this.textBox1.ScrollToCaret();
当textbox为多行时,获取它的行数:
int count = this.txtMsgInfo.Lines.GetUpperBound(0);
this.textBox1.Select(this.txtMsgInfo.TextLength, 0);
this.textBox1.ScrollToCaret();