Dim s As String = "abcdef"
s = StrReplaceAt(s, 2, "X")
Sub StrReplaceAt(str As String, Index As Int, Replacement As String) As String
Dim newStr As String = str.SubString2(0, Index) & Replacement
If Index < str.Length - 1 Then newStr = newStr & str.SubString(Index + 1)
Return newStr
End Sub