I have a string called \"hello world\"
I need to replace the word \"world\" to \"csharp\"
for this I use:
string.Replace(\"World\", \"csharp\
.Net Core has this method built-in: Replace(String, String, StringComparison) Doc. Now we can simply write: "...".Replace("oldValue", "newValue", StringComparison.OrdinalIgnoreCase)
Replace(String, String, StringComparison)
"...".Replace("oldValue", "newValue", StringComparison.OrdinalIgnoreCase)