i have a list of 2d array like this:
static void Main(string[] args) {
List kidsL = new List();
int[,] square1 = new int[8, 8];
int[,] square2 = new int[8, 8];
int[,] square3 = new int[8, 8];
for (int i = 0; i < 8; i++)
for (int j = 0; j < 8; j++) {
square1[i, j] = 1;
square2[i, j] = 2;
square3[i, j] = 3;
}
kidsL.Add(square1);
kidsL.Add(square2);
kidsL.Add(square3);
Console.WriteLine();
Console.Read();
}
i want to determine sum of every array and find the maxamim/minimum one (in this case the maximum one is 192).
is there an easy way to do this or am I just going to have to loop through the old fashioned way?
解决方案
Well, you can use the following co