Permit2kill
Member
- Joined
- Jun 25, 2007
- Messages
- 21
- Programming Experience
- Beginner
Hey guys,
I have a question regarding global arrays in VB.Net.
Basically I've got an Array that I need to use in two different Sub procedures. One handles a button click, one handles a timer tick.
I've tried setting my array up so it's global. In theory I was hoping I would be able to edit the values of this array in my button click event and use the values at a later date in the timer tick.
However, when I go to use the values for some reason "Nothing" is stored in the array when I go to use it in my Timer Tick Event.
In the past I've had the same error but have been able to solve it by declaring the array locally and passing it to the sub procedures I needed it in. As far as I know I'm not able to do that in this case
Any help would be much appreciated, and I hope I explained my problem clearly enough for you guys.
-Permit
I have a question regarding global arrays in VB.Net.
Basically I've got an Array that I need to use in two different Sub procedures. One handles a button click, one handles a timer tick.
I've tried setting my array up so it's global. In theory I was hoping I would be able to edit the values of this array in my button click event and use the values at a later date in the timer tick.
However, when I go to use the values for some reason "Nothing" is stored in the array when I go to use it in my Timer Tick Event.
In the past I've had the same error but have been able to solve it by declaring the array locally and passing it to the sub procedures I needed it in. As far as I know I'm not able to do that in this case
Any help would be much appreciated, and I hope I explained my problem clearly enough for you guys.
-Permit