I need to combine two multi-line textboxes in vb net, like this:
textbox1:
a
b
c
d
textbox2:
1
2
3
4
textbox3:
a1
b2
c3
d4
Just a form with three textboxes. And a button to merge/combine/concatenate each value from t1 and t2, in t3.
One of my attempts:
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
For Each line In TextBox1.Lines
For Each linex In TextBox2.Lines
Me.TextBox3.Text += line & linex
Me.TextBox3.Text += Environment.NewLine
Next
Next
End Sub
but result combination of lines (lines=linex) taken by two (a1,a2,a3,b1,b2,b3...)