Interface IEnumerator
Supports a simple iteration over a non-generic collection.
Namespace: System.Collections
Assembly: mscorlib.dll
Syntax
public interface IEnumerator
Properties
| Improve this Doc View SourceCurrent
Gets the element in the collection at the current position of the enumerator.
Declaration
object Current { get; }
Property Value
Type | Description |
---|---|
Object | The element in the collection at the current position of the enumerator. |
Methods
| Improve this Doc View SourceMoveNext()
Advances the enumerator to the next element of the collection.
Declaration
bool MoveNext()
Returns
Type | Description |
---|---|
Boolean | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |
Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
Declaration
void Reset()