System::Collections::IEnumerator class

IEnumerator class

Interface of enumerator which can be used to iterate through some elements. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class IEnumerator : public virtual System::IDisposable,
                    public virtual System::Object
ParameterDescription
TElement type.

Methods

MethodDescription
virtual Current() constGets current element.
virtual get_Current() constGets current element.
virtual MoveNext()Moves enumerator to the next element. If no element was referenced before, sets reference to the first element available. If container end was hit, does nothing.
virtual Reset()Resets enumerator to position before first element.

Typedefs

TypedefDescription
ValueTypeRTTI information.

See Also