//将换行转为空格 string str = this.DetailEdit.Text.Replace("\r\n"," "); 转载于:https://www.cnblogs.com/tianhengblogs/p/5843047.html