当textbox为多行时,获取它的行数:int count = this.txtMsgInfo.Lines.GetUpperBound(0); 转载于:https://www.cnblogs.com/pnljs/p/3746338.html