c# - Why there is "index exceeded the number of group boundaries" in this code? -


for code in visual studio

point[,] point = new point[9, 10]; (int = 0; < 9; i++)  {   for(int j = 0; < 10; j++)    {     point[i, j].x = i;//mark1     point[i, j].y = j;        }  } 

at //mark1,system tell me"index exceeded number of group boundaries"

why?

enter image description here

you doing

for (int j = 0; < 10; j++) 

so condition i < 10 maybe typo causing loop go out of range in array (you trying access eleement 0, 10 in array)

replace with:

for (int j = 0; j < 10; j++) 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -