sebastiz
asked on
Create arraylists dynamically based on loop
I have a textbox with some text in it. I have a loop that retrieves bits of the text based on a regular expression and stores it in a listbox.
I then have a second loop which takes each value in this listbox and retrieves bits of the text in the textbox with a regular expression based on each value from the first listbox, and stores all of it in another listbox.
I would like to create an array list for each value in the first listbox which stores the retrieved bit of text for that value from the second loop.
I guess the question is about how to create a number of new arraylists programmatically based on how many items are in a listbox...... (in vb.net)
I then have a second loop which takes each value in this listbox and retrieves bits of the text in the textbox with a regular expression based on each value from the first listbox, and stores all of it in another listbox.
I would like to create an array list for each value in the first listbox which stores the retrieved bit of text for that value from the second loop.
I guess the question is about how to create a number of new arraylists programmatically based on how many items are in a listbox...... (in vb.net)
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Great. How do I then reference the arraylist within the arraylist. Lets say I then want to loop through the second arrayllist in the parent arraylist?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Brilliant. Many thanks
http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx
Wayne