IEnumerator and index of current value

  • Thread starter Thread starter Fernando Rodríguez
  • Start date Start date
F

Fernando Rodríguez

Hi,

With Current I can get the current value of an IEnumerator, but how can I get
the index in the collection of the current value?

Thanks
 
Fernando,

Unless the item itself knows its position, you won't be able to get
this. You will have to keep track of the position of the items yourself.

Hope this helps.
 

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