How to fill an ArrayList with any number of duplicate objects
-----------------------------------------------------------------------------------
Public Sub add_to_listbox()
ListBox1.Items.Clear()
ListBox1.Items.AddRange(MyArray.ToArray)
Me.Text = MyArray.Count.ToString
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
MyArray = ArrayList.Repeat("Anuraj s", 5)
add_to_listbox()
End Sub
No comments:
Post a Comment