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
Yet another
public static string ReplaceAtPosition(this string self, int position, string newValue) { return self.Remove(position, newValue.Length).Insert(position, newValue); }