◆带变量的通配符如何写法◆在过滤datatable记录的时候,输入内容如果出现通配符:[、]、%、*等等,会出现 Like 运算符中出错: 字符串模式“% %”无效的情况,如下
string s=tb.Textstring str = " text like '%" + s + "%'";DataRow[] dr = dt.Select(str);
string str = @"text like '%" + @s + "%'";