M
mipakteh
Guest
Hi All,
I try to join of string between two string to one.It can be succeed by using this code
For I As Integer = 0 To AA_.Count - 1
TextBox1.AppendText(AA_(I) & BB_(I) & vbCrLf)
Next
But I want try use then "Concat", String.Join or whatever.
Public Class Form1
Dim A_ As New List(Of String)
Dim B_ As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
A_.Add("01")
A_.Add("23")
A_.Add("74")
B_.Add("2")
B_.Add("7")
B_.Add("8")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim AA_ As New List(Of String)
Dim BB_ As New List(Of String)
For I As Integer = 0 To A_.Count - 1
TextBox1.AppendText(A_(I) & vbCrLf)
AA_.Add(A_(I) & vbCrLf)
Next
For I As Integer = 0 To B_.Count - 1
TextBox2.AppendText(B_(I) & vbCrLf)
BB_.Add(B_(I) & vbCrLf)
Next
'Dim MixAB_ = AA_.Concat(BB_)
'Dim MixAB_ = String.Join(AA_, BB_)
'Dim MixAB_ = AA_.AddRange(BB_)
For I As Integer = 0 To MixAB_.Count - 1
TextBox3.AppendText(MixAB_(I) & vbCrLf)
Next
End Sub
End Class
TextBox3 show the result like "012 , 237, 748"
Thank.
Continue reading...
I try to join of string between two string to one.It can be succeed by using this code
For I As Integer = 0 To AA_.Count - 1
TextBox1.AppendText(AA_(I) & BB_(I) & vbCrLf)
Next
But I want try use then "Concat", String.Join or whatever.
Public Class Form1
Dim A_ As New List(Of String)
Dim B_ As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
A_.Add("01")
A_.Add("23")
A_.Add("74")
B_.Add("2")
B_.Add("7")
B_.Add("8")
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim AA_ As New List(Of String)
Dim BB_ As New List(Of String)
For I As Integer = 0 To A_.Count - 1
TextBox1.AppendText(A_(I) & vbCrLf)
AA_.Add(A_(I) & vbCrLf)
Next
For I As Integer = 0 To B_.Count - 1
TextBox2.AppendText(B_(I) & vbCrLf)
BB_.Add(B_(I) & vbCrLf)
Next
'Dim MixAB_ = AA_.Concat(BB_)
'Dim MixAB_ = String.Join(AA_, BB_)
'Dim MixAB_ = AA_.AddRange(BB_)
For I As Integer = 0 To MixAB_.Count - 1
TextBox3.AppendText(MixAB_(I) & vbCrLf)
Next
End Sub
End Class
TextBox3 show the result like "012 , 237, 748"
Thank.
Continue reading...