Hello. I can’t find the way to do this, can someone help?
I simplify the problem to get the anwer (i actually have so many of these double arrays):
I have a double array:
int [ , ] = theArray;
theArray[ , ]= new int[5, 2];
In my head, there should be 3 different ways to declare its values. FRom best way (in my head) to worst way to do it, are they possible?
BEST WAY:
So there are 5 arrays of 2 integrer numbers.
There is a way to define its values array per array? something like this:
theArray[0] = [3,4];
theArray[1] = [5,8];
theArray[2] = [1,1];
theArray[3] = [7,0];
theArray[4] = [3,0];
2nd BEST WAY:
theArray = [[3,4],[5,6],[1,1,],[7,0],[3,0]];
WORST WAY:
Because, defining all values 1 by 1 will be sooo long:
theArray[0,0] =3;
theArray[0,1] =4;
theArray[1,0] =5;
theArray[1,1] =8;
......
Anyone knows how to do best way? and if not, how to do 2nd best way?
THAANKS !!!