我有以下代碼:「埃裏克」DataTable表達式不能解釋標記'!'
//myDataTable has the following collumns: UserName, Birthday and email.
string name = "eric!";
string expression = "UserName = " + name;
DataRow[] result = myDataTable.Select(expression);
我要選擇的名稱都行。
「!」給我以下錯誤:
Cannot interpret token "!".
我該如何選擇帶有這些標記的所有行?
(我真的需要「!」的表達,因爲我提取.sql文件的用戶名)