I have the following code
string line = \"\";
while ((line = stringReader.ReadLine()) != null)
{
// split the lines
for (int c = 0; c < line.Len
to remove all '\' from a string, simply do the following:
myString = myString.Replace("\\", "");
I have faced this issue so many times and I was surprised that many of these don't work.
I simply deserialize the string with Newtonsoft.Json and I get cleartext.
string rough = "\"call 12\"";
rough = JsonConvert.DeserializeObject<string>(rough);
//the result is: "call 12";
Try using
String sOld = ...;
String sNew = sOld.Replace("\\", String.Empty);
line = line.Replace("\\", "");