C# .NET - How to replace single quote with double quotes in c#?

Asked By srikanth nekkanti on 03-Oct-12 12:55 AM
i have tried  temp.replace("'","\"");

it is getting replaced,but  an escaping sequence \ is also adding in the result.I don't want that escaping sequence,please help me.

Thanks in advance
Neha Garg replied to srikanth nekkanti on 03-Oct-12 01:30 AM

See the below example:

string temp = mystring.Replace("'", "\");

Rohan Dave replied to srikanth nekkanti on 04-Oct-12 03:31 AM
try by below..

temp.Replace(" ' "," '' ");