Get index of Enumerator.Current in C# -


possible duplicate:
(c#) index of current foreach iteration

good morning,

is there way can index of enumerator's current element (in case, character in string) without using ancillary variable? know perhaps easier if used while or for cicle, looping through string using enumerator more elegant... drawback case need each character's current index.

thank much.

no, ienumerator interface not support such functionality.

if require this, either have implement yourself, or use different interface ilist.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -