Declaring the two double values (arrays) as variables in the class should allow you to make use of them everywhere in the code for that class.
class X
{
double[] value1;
double[] value2;
protected void btn1_Click(object sender, EventArgs e)
{
double[] val1 = {...};
value1 = val1;
double[] val2 = {...};
value2 = val2;
}
}
And so on.
1
solved Passing variable double[] [closed]