I am having a problem with string replacement. Below is my code as of now. I want to replace each character in textbox1 and write it to textbox2, but this only works for the last character.
If I write:
Hello
Then it should end up as:
[[h]][[e]][[l]][[l]][[o]]
Public Class Form1
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Try
TextBox2.Text = TextBox1.Text.Replace("0"c, "[[something0a0]]")
TextBox2.Text = TextBox1.Text.Replace("1"c, "[[something1a1]]")
TextBox2.Text = TextBox1.Text.Replace("2"c, "[[something2a2]]")
TextBox2.Text = TextBox1.Text.Replace("3"c, "[[something3a3]]")
Catch ex As Exception
End Try
End Sub
End Class