O'Reilly logo

C# in a Nutshell by Peter Drayton, Ted Neward, Ben Albahari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

IEnumerator

Synopsis

This interface provides an enumerator to iterate over the elements of a collection. The Current property gets the current element in the iteration. MoveNext() advances to the next collection element. Reset() returns the position of the iteration to the start of the collection, just before the first element; an initial call to MoveNext() is necessary to retrieve the first element of the collection.

public interface IEnumerator {
// Public Instance Properties
   public field object Current{get; } 
// Public Instance Methods
   public method bool MoveNext();  
   public method void Reset();  
}

Implemented By

IDictionaryEnumerator, System.CharEnumerator, System.Globalization.TextElementEnumerator, System.Runtime.Serialization.SerializationInfoEnumerator

Returned By

Multiple types

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required