|
-
Oct 5th, 2008, 08:25 PM
#1
Thread Starter
New Member
[2008] Create an array and add items to it
I would like to create an array named ingredients, and add items to the array based upon certain criteria. Then I want to use the array to populate a listbox with the ingredients.
Something like this:
Dim ingredients as arraylist = new arraylist
ingredients.Add = (oilamt(x) & " " & measure & " " oilname(x))
lstIngredients.items = ingredients()
This section of code is part of a larger part where x is defined and this would be inside a loop to add all items necessary.
I can't figure out whether to use array or arraylist, first of all, and how to make it work. Thanks for any help!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|