Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Dim R(76800) As Byte

 

once I have inserted stuff in the array I clear it with:

 

Array.Clear(R, 0, 76800)

 

next time I try to put stuff in it -> indexOutOfRangeException. So am I clearing the array in a wrong way or what ? Help needed.

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

  • Leaders
Posted

how are you trying to add items back to the array? ie : to what index?

i just did this simple test which worked fine ...

       Dim R(76800) As Byte
       R(0) = 123
       MessageBox.Show(R(0)) '/// first value
       Array.Clear(R, 0, R.Length) '/// clear all values
       R(0) = 222
       MessageBox.Show(R(0)) '/// second value

Posted (edited)
Problem solved, I had this Integer indexcounter overflowing.... thx anyway! Edited by DR00ME

"Everything should be made as simple as possible, but not simpler."

"It's not that I'm so smart , it's just that I stay with problems longer ."

- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...