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
Post a Comment