Devendra Kumar

Devendra Kumar

  • NA
  • 500
  • 157.9k

Single quote problem in Datatable.Select

Aug 17 2017 12:25 PM
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)