String.Replace ignoring case

前端 未结 17 798
野趣味
野趣味 2020-11-29 19:03

I have a string called \"hello world\"

I need to replace the word \"world\" to \"csharp\"

for this I use:

string.Replace(\"World\", \"csharp\         


        
17条回答
  •  被撕碎了的回忆
    2020-11-29 19:43

    You can use the Microsoft.VisualBasic namespace to find this helper function:

    Replace(sourceString, "replacethis", "withthis", , , CompareMethod.Text)
    

提交回复
热议问题