如何在传递给DataTable Select()的字符串中包含撇号?

use*_*ser 6 datatable ado.net

dt.Select(string)给出错误missing operandapostrophe符号是的字符串中.

解决这个错误的方法是什么?或如何处理此错误?

Rub*_*ias 11

String value = "Rubens' Home"; // value you want to sanitize and search
dt.Select(String.Format(
    "Location = '{0}'", value.Replace("'", "''")));
Run Code Online (Sandbox Code Playgroud)