I have a static array which uses a static variable called Variables.rows to define the number of rows in the array. Variables.rows is defined in another static class called Variables.
public static class TheArrayClass
{
public static double[,] HiThere = new double[Variables.rows, 6];
}
My problem is that the static array is created as soon as the project in run (I believe). This means that the methods needed to assign the correct value to Variables.Rows are not executed in time. This means that I get an index error when populating the array because the array does not have the correct size.
I need a way around this so that I can access the array from anywhere in my code please.
Variables.Rowsdefined?