I have this string: ABCDEFGHIJ
ABCDEFGHIJ
I need to replace from position 4 to position 5 with the string ZX
ZX
It will look like this: ABC
ABC
You could try something link this:
string str = "ABCDEFGHIJ"; str = str.Substring(0, 2) + "ZX" + str.Substring(5);