M
mipakteh
Guest
Hi All,
I have striing in List like this;
Max :15(0)Max :15(0)
Max :11(1)Max :11(1)
Max :12(2)Max :12(2)
Max :6(3)Max :6(3)
Max :7(4)Max :7(4)
Max :16(5)Max :16(5)
Max :1(6)Max :1(6)
Max :16(7)Max :16(7)
Max :17(8)Max :17(8)
Max :15(9)Max :15(9)
in TextBox1 .I want to show in TextBox2 as bellow;
00
11
22
33
44
55
66
77
88
99
I want leave then umnber in bracket only.
Thank.
Public Class Form1
Private A_ As New List(Of String)
Private B_ As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For j As Integer = 0 To 9
Dim value As Integer = CInt(Int((20 * Rnd()) + 1))
A_.Add("Max :" & value & "(" & j & ")")
Next
For I As Integer = 0 To A_.Count - 1
TextBox1.AppendText(A_(I) & A_(I) & vbCrLf)
B_.Add(A_(I) & A_(I))
Next
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For I As Integer = 0 To B_.Count - 1
Dim List As String = B_(I)
List = List.Replace("Max :", "")
List = List.Remove(0, List.IndexOf("(") + 1)
List = List.Remove(List.LastIndexOf(")"))
'List = List.Remove(")", "(","")
'Dim subst As String = List.Substring("(", ")")
Me.TextBox2.AppendText(List & vbCrLf)
Next
End Sub
End Class
Continue reading...
I have striing in List like this;
Max :15(0)Max :15(0)
Max :11(1)Max :11(1)
Max :12(2)Max :12(2)
Max :6(3)Max :6(3)
Max :7(4)Max :7(4)
Max :16(5)Max :16(5)
Max :1(6)Max :1(6)
Max :16(7)Max :16(7)
Max :17(8)Max :17(8)
Max :15(9)Max :15(9)
in TextBox1 .I want to show in TextBox2 as bellow;
00
11
22
33
44
55
66
77
88
99
I want leave then umnber in bracket only.
Thank.
Public Class Form1
Private A_ As New List(Of String)
Private B_ As New List(Of String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For j As Integer = 0 To 9
Dim value As Integer = CInt(Int((20 * Rnd()) + 1))
A_.Add("Max :" & value & "(" & j & ")")
Next
For I As Integer = 0 To A_.Count - 1
TextBox1.AppendText(A_(I) & A_(I) & vbCrLf)
B_.Add(A_(I) & A_(I))
Next
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For I As Integer = 0 To B_.Count - 1
Dim List As String = B_(I)
List = List.Replace("Max :", "")
List = List.Remove(0, List.IndexOf("(") + 1)
List = List.Remove(List.LastIndexOf(")"))
'List = List.Remove(")", "(","")
'Dim subst As String = List.Substring("(", ")")
Me.TextBox2.AppendText(List & vbCrLf)
Next
End Sub
End Class
Continue reading...