有点麻烦用双引号替换单引号
so would like query to change from "partA LIKE 'true'" to "partA LIKE "true""
试过了
Query.Replace(@"'", @""");
Query.Replace("\'", "\\\"");
但很高兴
TA
答案 0 :(得分:2)
这可能有效:
Query.Replace("'","\"");
请记住.replace会返回一个字符串,并且不会直接更改它,因此请将其分配给另一个字符串,如下所示:
String newString = oldString.Replace("'","\"");
或者像这样使用它:
MessageBox.Show(Query.Replace("'","\""));