I am trying to remove all of a specific character from a string. I have been using String.Replace, but it does nothing, and I don\'t know why. This is my current co
String.Replace
Two things:
1) C# Strings are immutable. You'll need to do this :
Gamertag2 = Gamertag2.Replace("^" + 1, "");
2) "^" + 1? Why are you doing this? You are basically saying Gamertag2.Replace("^1", ""); which I'm sure is not what you want.
"^" + 1
Gamertag2.Replace("^1", "");