string.Replace does not work for quote
- by Azhar
((string)dt.Rows[i][1]).Replace("'", "\'")
I want the result that if any string have quote it change it into slash quote
e.g John's - John\'s
but the above replace function is not working fine.
it results like John\'s
but if we change the code to
((string)dt.Rows[i][1]).Replace("'", "\'")
it gives the Result like John's
does change it…