Table of Contents

Class SimpleEnumerator<T>

Namespace
Ecng.Collections
Assembly
Ecng.Collections.dll

Provides an abstract base class for implementing a simple enumerator with disposable functionality.

public abstract class SimpleEnumerator<T> : Disposable, IEnumerator<T>, IEnumerator, IDisposable

Type Parameters

T

The type of elements being enumerated.

Inheritance
SimpleEnumerator<T>
Implements
Derived
Inherited Members
Extension Methods

Constructors

SimpleEnumerator()

protected SimpleEnumerator()

Properties

Current

Gets the current element in the collection.

public T Current { get; protected set; }

Property Value

T

Methods

MoveNext()

Advances the enumerator to the next element of the collection.

public abstract bool MoveNext()

Returns

bool

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.

public virtual void Reset()

Remarks

This implementation does nothing by default and can be overridden by derived classes.