fresh fish here, apologize in advance... I am trying to compare an array to a matrix, each row at a time. (like a check for winning the lottery). I am doing this with three FOR loops and one IF inside of them. I keep getting 'System.IndexOutOfRangeException'. This is the code (without the Curly Braces):
for (int i = 0; i < table.Length; i++)
int count = 0;
for (int j = 0; j < table.Length; j++)
for (int k = 0; k < winner.Length; k++)
if (winner[k] == table[i, j])
count += 1;
If someone could help I would be so happy :)