When i apply IEnumerator and perform MoverNext() will it traverse like
C-Style 'a' 'p' 'p' 'l' 'e' '\o'
until it finds null character?I thought it would return the entire string.How does the enumeration work here?
string ar = "apple";
IEnumerator enu = ar.GetEnumerator();
while (enu.MoveNext())
{
Console.WriteLine(enu.Current);
}
I get output as
a
p
p
l
e