Question what is the error?

andrews

Well-known member
Joined
Nov 22, 2011
Messages
169
Programming Experience
5-10
I use vb.net 2022 and during debugging I get an error that I don't understand, in a code there is a code line where I increase a variable integer several times, until it suddenly stops when increasing to 8, the error according to the error message says that it exceeds the array index, but this is about the variable and not about an array?
 
You need to do some work on how you ask a question. Firstly, you haven't botheterd to show us the code that generates the exception and you also haven;t provided the actual error message, but rather your vague approximation. If you're being told that you're using an array index that exceeds the upper bound then that's what you're doing. If you expect us to be able to tell you why then we need tyo be able to see the code that's doing it. In future, please explain what you're actually trying to achieve, how you're trying to achioeve it (including ALL and ONLY the code relevant to the problem) and what happens when you try (including the actual error message and where exactly it ocurs).
 
You need to do some work on how you ask a question. Firstly, you haven't botheterd to show us the code that generates the exception and you also haven;t provided the actual error message, but rather your vague approximation. If you're being told that you're using an array index that exceeds the upper bound then that's what you're doing. If you expect us to be able to tell you why then we need tyo be able to see the code that's doing it. In future, please explain what you're actually trying to achieve, how you're trying to achioeve it (including ALL and ONLY the code relevant to the problem) and what happens when you try (including the actual error message and where exactly it ocurs).

It is solved with what I can understand.
My starting point was, how can the program know when changing a variable integer that the integer is used later in an array.
Never seen before but now.
My only explanation is that this is now possible with an update of vb.net with now looking ahead
I have adjusted the array and the error has disappeared.
 
Back
Top