Remove '\' char from string c#

后端 未结 10 1076
谎友^
谎友^ 2020-12-15 03:16

I have the following code

string line = \"\"; 

while ((line = stringReader.ReadLine()) != null)
{
    // split the lines
    for (int c = 0; c < line.Len         


        
10条回答
  •  醉酒成梦
    2020-12-15 03:42

    to remove all '\' from a string, simply do the following:

    myString = myString.Replace("\\", "");
    

提交回复
热议问题