Hi everybody .....
i write this code to select rundom from list box(1)[have decimal number ] and but in the listbox(2) in list box 2 select the max value and but in the listbox(3)
((for examble i but 4 number in listbox(1)the function find 4 random number and find th max and do the function 4 times ))
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Randomize()
Dim Smax As String
For h = 0 To ListBox1.Items.Count - 1
For i = 0 To ListBox1.Items.Count - 1
Dim R As Long
R = ListBox1.Items.Count - 1
ListBox1.SelectedIndex = Rnd() * R
ListBox2.Items.Add(ListBox1.SelectedItem.ToString)Dim n As Integer
For n = 0 To Me.ListBox2.Items.Count - 1
If Me.ListBox2.Items(n) > Smax ThenSmax = Me.ListBox2.Items(n)
ElseSmax = Smax
End IfNext
Next
Me.ListBox3.Items.Add(Smax)Next
End Sub
Question :
i want to convert this code and put the result in arraylist rather than listbox
we should in the code no used the listbox !!!!!
how to do this?????????????