如何使用 RowFilter 搜索带有 & 号的字符串(或任何其他“特殊”字符。例如!"£$%^&*())
当我尝试时,我收到以下错误:
Like 运算符中的错误:字符串模式 '%£(*$\&%' 无效
我的 RowFilter 的副本如下:
value="£(*$\&"; //I know this is rubbish, but I don't want the system to crash.
filterString = string.Format("Description LIKE '%{0}%'", value);
myDataView.RowFilter=filterString;
提前致谢。
我正在使用 C# 4.0