C# string replace
Try this:
line.Replace("\",\"", ";")
The simplest way is to do
line.Replace(@",", @";");
Output is shown as below:
You need to escape the double-quotes inside the search string, like this:
string orig = "\"Text\",\"Text\",\"Text\"";
string res = orig.Replace("\",\"", ";");
Note that the replacement does not occur "in place", because .NET strings are immutable. The original string will remain the same after the call; only the returned string res
will have the replacements.