hashtable issue

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi,

The following triggers this error :
Enumeration has either not started or has already finished.

(msg is a valid string)
CtrlStatus.Add(CInt(dtCtrl.Rows(iCntr).Item("FieldID")), msg)
Dim keys As IEnumerator = CtrlStatus.Keys.GetEnumerator()
Dim values As IEnumerator = CtrlStatus.Values.GetEnumerator()

my hashtable contains the right keys because when i type
CtrlStatus.contains(3) it works (3 is my only key). Besides .count
returns the correct number of elements.

So why do i get this message ?

thx
 
ok i've found out...
I had to use keys.movenext and same for values

cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top