2 回答

TA貢獻(xiàn)1840條經(jīng)驗(yàn) 獲得超5個(gè)贊
缺少以下條件:
if (table.GetLength(0) < xIndex)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? break;
? ? ? ? ? ? }
? ? ? ? ? ? if (previousValue.Equals(newPreviousValue) && yIndex < table.GetLength(1))
? ? ? ? ? ? {
? ? ? ? ? ? ? ? yIndex += 1;
? ? ? ? ? ? ? ? table[xIndex, yIndex] = previousValue;
? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {
? ? ? ? ? ? ? ? xIndex += 1;
? ? ? ? ? ? ? ? yIndex = 0;
? ? ? ? ? ? ? ? table[xIndex, yIndex] = previousValue;
? ? ? ? ? ? }
? ? ? ? ? ? newPreviousValue = previousValue;
所以不是table.GetLength(1) < yIndex它必須是yIndex < table.GetLength(1)。
- 2 回答
- 0 關(guān)注
- 209 瀏覽
添加回答
舉報(bào)