So I need help on an assignment and I\'ve been trying to solve it for more than a week, but I need help on putting an arraylist inside a listbox.
That\'s what the
List1.Items.Clear
List1.Items.AddRange(al1.ToArray)
OR,
List1.Items.Clear
For each obj as object in al1
List1.Items.Add(obj)
Next
Or,
List1.Items.Clear
For i as Integer = 0 to al1.count-1
List1.Items.Add(al1(i))
Next
You will have to override the ToString of your object in the Arraylist. You will have to make the listbox font a fixed font so you can do the spacing (Courier New).
I would suggest using a Generic.List (Of clsCustomer) however if that's not in the assignment you'll be stuck typecasting the objects in the arraylist.
This still leaves out a ton of detail for solving that assignment, however.
Good luck.