Accessing an arraylist from another form
I'm enjoying C#, but every now and then I come up against a brick wall.
My problem is that I have a class with an arraylist that is populatd from a text file on my HD. On a form I have a listbox that needs to be populated with items from the arraylist, but I am unsure as how to go about accessing the arraylist from another form.
Any help woud be great.
Thanks in advance
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Binu Subi68 pointsPosted Mar 6, 2006, 10:25 AM EST
Write a Public Property to expose the ArrayList from the second form and Access it from the first form.
bod9 pointsPosted Mar 6, 2006, 11:44 AM EST