这是我的变量
string[,] table = new string[104, 6];
int moveRow = 1;
int moveCol = 1;
int sum1 = 0;
int sum2 = 0;
int rowIndex1 = 1;
int rowIndex2 = 0;
int firstTableRow = 1;
int firstTableCol = 1;
int secondTableRow = 1;
int secondTableCol = 0;
int thirdTableRow = 0;
int thirdTableCol = 1;
int fourthTableRow = 0;
int fourthTableCol = 0;
int counterNextRow = 0;
现在它给了我(只为我)一个奇怪的Array index is out of range地方
if (moveRow > 1)
{
firstTableCol += 1;
secondTableCol += 1;
thirdTableCol += 1;
fourthTableCol += 1;
//r1 = table[2,1] r2 = table[2,0] r3 = table[1,1] r4 = table[1,0]
string d1 = table[firstTableRow, firstTableCol]; //<------- HERE ITS GIVING ME THE ERROR
string d2 = table[secondTableRow, secondTableCol];
string d3 = table[thirdTableRow, thirdTableCol];
string d4 = table[fourthTableRow, fourthTableCol];
moveRow += 1;
}
由于那个错误,我一直被困在这里,我不知道为什么它会给我一个Array index is out of range
错误。我那里没有任何负数,所以据说我不会遇到那种错误。有人可以指出我。
POPMUISE
江户川乱折腾
相关分类