2
Answers

Single quote problem in Datatable.Select

Photo of Devendra Kumar

Devendra Kumar

7y
2.6k
1
Hello
I got stuck while searching on a DataTable
 
DataTable contains data like John's
When I pass
 
var des = "John's";
var rows = datatable.Select($"Description = '{des}');
 
This throw an exception 
Missing operand after n
 
I also tried parsing with slash but it still throws the same exception
 
 
Any solution? 

Answers (2)