R
Roy Gourgi
Hi,
I am new to C#. I am trying to create some variables and arrays that can be
seen throughtout the whole program. I have no choice as they have to be seen
by the whole program. Where and how do I declare them? I tried putting the
variable gnSum and gaArray in my Main() method but the rest of the program
does not see them.
class RefValTest
{
public static int Main()
{
int gnSum=0; // global variable
int[] gaArray= new int [7]; // global array
return 0;
}
}
TIA
Roy
I am new to C#. I am trying to create some variables and arrays that can be
seen throughtout the whole program. I have no choice as they have to be seen
by the whole program. Where and how do I declare them? I tried putting the
variable gnSum and gaArray in my Main() method but the rest of the program
does not see them.
class RefValTest
{
public static int Main()
{
int gnSum=0; // global variable
int[] gaArray= new int [7]; // global array
return 0;
}
}
TIA
Roy