I want to replace the first occurrence in a given string.
How can I accomplish this in .NET?
string abc = "AAAAX1"; if(abc.IndexOf("AA") == 0) { abc.Remove(0, 2); abc = "XQ" + abc; }