❔ System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'
Guys I'm making a Tetris game using WPF C#.
When I ran the game this happened
Please help. Thank you !
8 Replies
what is your question?
if you don't know what the error means. This should explain it: https://stackoverflow.com/questions/21700879/error-index-was-outside-the-bounds-of-the-array
Stack Overflow
Error : Index was outside the bounds of the array.
I'm aware of what the issue is stating but I am confused to how my program is outputting a value that's outside of the array..
I have an array of ints which is 0 - 8 which means it can hold 9 ints,
So um I ran the proj without seeing any bug.
Then the window of the game appears.
But it immediately teleported me to this right here.
I have never seen this kind of "behavior" before
what kind of behaviour are you speaking off, did you never encountered an exception?
So here's the footage.
I've never come across this kind of error
I mean, at first 0 error detected, then I pressed run, the application window pops up, and then it immediately take me to the part where there's an error
Oh nvm I fixed it. !!
It was just a tiny little mistake between 1 and -1
Thank you so much for your attention ^^
There is a big difference between compiler errors and runtime exceptions.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.