Maha

Maha

  • NA
  • 0
  • 328.2k

IEnumerator

May 14 2014 9:07 AM
I wish to know what this program is try to say.

using System;
using System.Collections;

class MainClass
{
static void Main()
{
int[] intArray = { 10, 11, 12, 13 };

IEnumerator ie = intArray.GetEnumerator();

while (ie.MoveNext() == true)
{
int i = (int)ie.Current;
Console.WriteLine("{0}", i);
}

Console.Read();
}
}
/*
10
11
12
13
*/


Answers (5)