❔ 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
anita
anita2y ago
what is your question?
anita
anita2y ago
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,
RagequitMaster
RagequitMasterOP2y ago
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
anita
anita2y ago
what kind of behaviour are you speaking off, did you never encountered an exception?
RagequitMaster
RagequitMasterOP2y ago
So here's the footage. I've never come across this kind of error
RagequitMaster
RagequitMasterOP2y ago
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 ^^
anita
anita2y ago
There is a big difference between compiler errors and runtime exceptions.
Accord
Accord2y ago
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.
Want results from more Discord servers?
Add your server