I have the following code:
//myDataTable has the following collumns: UserName, Birthday and email.
string name = "eric!";
string expression = "UserName = " + name;
DataRow[] result = myDataTable.Select(expression);
I want to select all rows with the name "eric!".
The "!" gives me the following error:
Cannot interpret token "!".
How can I select all rows with such tokens?
(I really need the "!" in the expression since I extract the userNames from a .sql file)