Hello Fred
Where is the correct place to declare an array so that it will be
available anywhere in the project.
Well if you want ti to be aviallable everywhere in your whole project i
would say declare a module ( static class ) and declare your array there as
Friend or Public
( Friend is availlable in your whole Code but only inside your assembly ,
Public is availlable in your whole Code but also outside your assembly )
However although above is technicly possible it is bypassing common coding
guides to code in a more robust self sustainable way
in the case you describe it should be enough to declare the array at Class
level .
And even in the case that you want to use the array in another class (
object ) you could add a property to that class for your array and thus
pass it over and back to the next code logic
regards
Michel Posseth
"Fred Blair" <pa******@thetravelintexans.comschreef in bericht
news:gf**********@news.motzarella.org...
Where is the correct place to declare an array so that it will be
available anywhere in the project.
I have been playing with one form that has two buttons and one listbox. I
want each button to add a name from an array to the list box.
Unless I declare the array inside each button_click event, it says the
array has not been declared.
Help please,
Fred