[求助]字符串!
string strRowFilter = "";string strTxt1 = this.textBox1.Text.Trim();
string strCmb1 = this.comboBox1.Text.Trim();
string strCmb2 = this.comboBox2.Text.Trim();
string strCmb3 = this.comboBox3.Text.Trim();
if (strTxt1 != "")//设置表的查询条件
strRowFilter += "姓名 like '%" + strTxt1+ "%' and ";
if (strCmb1 != "")
strRowFilter += "性别 like '%" + strCmb1+ "%' and ";
if (strCmb2 != "")
strRowFilter += "民族 like '%" + strCmb2+ "%' and ";
if (strCmb3 != "")
strRowFilter += "籍贯 like '%" + strCmb3+ "%' and ";
if (strRowFilter != "")//存在查询条件
{
strRowFilter = strRowFilter.Substring(0, strRowFilter.Length-5);
tempTable.DefaultView.RowFilter = strRowFilter;
}
请问其中的strRowFilter=strRowFilter.Substring(0,strRowFilter.Length-5);是什么意思?