Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
CSS
int[] myArr = new int[3];
     myArr[0] = 1;
     myArr[1] = 2;
     myArr[2] = 3;
    
     // Displays the values of the Array.
     int i = 0;
     System.Collections.IEnumerator ee = myArr.GetEnumerator();
     ee.MoveNext();

Now my question is that

ee is interface so MoveNext() method is called from object it contains.So here it SZArrayEnumerator But i not found information about this??What is that?
Posted
Updated 25-Oct-12 5:36am
v4

1 solution

Array implements IEnumerator, and MoveNext method is part of IEnumerator. Using the Method Array.GetEnumerator() returns the IEnumerator for the Array. And Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.


Refer the link below :

About GetEnumerator Method[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900