I'm wondering whether it is possible to declare a global variable in a click event. I need to declare an array of a specific size. The specific size is generated using a series of IF statements. I only need to know how to declare it.

Thanks in advance

I'm using 3.5 Framework Visual Studio 2008.

I'm wondering whether it is possible to declare a global variable in a click event. I need to declare an array of a specific size. The specific size is generated using a series of IF statements. I only need to know how to declare it.

Thanks in advance

I'm using 3.5 Framework Visual Studio 2008.

Hi,

If you want to code in VB 2008 like it was meant to be used, check out OOP (object-oriented programming). You can achieve "global" variables without using a global variable with OOP.

Here is some information on OOP:

http://www.developerfusion.com/article/1047/new-objectoriented-capabilities-in-vbnet/2/

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.