|
-
Jun 25th, 2012, 08:42 PM
#1
Thread Starter
Member
indexoutofrange exception
OK, I'm a newbie, but please explain why the following doesn't give an indexoutofrange exception:
Dim ix(2) As Integer
For i As Integer = 0 To 3
ix(i) = i
Next
If I put it in a try..catch block, it catches the error, but if I don't then the program continues merrily on its way. Seems to me that in debugging mode, there should be some indication that an out of range exception has occurred without having to explicitly check for it. Admittedly, in this instance it's obvious, but in a more complex program, it might not be.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|