Reputation: 3945
Having a bit of bother replacing single quotation with double quotation
so would like query to change from "partA LIKE 'true'" to "partA LIKE "true""
have tried
Query.Replace(@"'", @""");
Query.Replace("\'", "\\\"");
but ney joy
Ta
Upvotes: 0
Views: 228
Reputation: 1489
This may work:
Query.Replace("'","\"");
Remember that .replace returns a string, and it don't change it directly, so assign it to another string like this:
String newString = oldString.Replace("'","\"");
Or use it like this:
MessageBox.Show(Query.Replace("'","\""));
Upvotes: 2