How to use a string as a name of a variable in c#
Hi mates,
How to use a string , to be a variable name, for example
suppose X="WELL"
then I want to have an array with this name -> double [] WELL = new double[10];
more specifically I want to create a set of arraies, in which the name of array is obtained by a loop:
for ( int i=0;i<20;i++)
{
string X= "WELL"+i.ToString();
double [] X = new double [10]; //???
}
Then I want to have a set of array :
double [] WELL1 =new double [10];
double [] WELL2 =new double [10];
...
double [] WELL19 = new double[10];
Thanks,