x


What means this error ?

hi,

I get this error it is in one of my previous questions ;

What does it means ?,

IndexOutOfRangeException: Array index is out of range.

more ▼

asked Apr 20 '11 at 09:20 PM

kilian277 gravatar image

kilian277
88 17 24 32

(comments are locked)
10|3000 characters needed characters left

1 answer: sort newest

You're trying to access an invalid index from a container-type variable(List/Array/Hashtable). Either the 'container' isn't initialized or you're reaching for a non-int, or a negative int. In any case, the problem is you're calling an inexistant value.

more ▼

answered Apr 20 '11 at 09:27 PM

by0log1c gravatar image

by0log1c
2.1k 6 9 18

or you are trying to go above the bounds of the array itself. Array of 5 objects but your trying to read index 10 for example.

Apr 20 '11 at 09:29 PM Bryan 4

People often have an off-by-one error. Mind that an array has a range starting with 0. So an array of 3 has index: 0,1,2. 3 is already OutOfBounds.

Apr 20 '11 at 10:18 PM Marnix

Without seeing the code that produces this error, there's nothing else to add ;)

Apr 20 '11 at 10:26 PM Bunny83
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1359
x106
x65
x17

asked: Apr 20 '11 at 09:20 PM

Seen: 852 times

Last Updated: Apr 20 '11 at 09:20 PM