System::Array::Enumerator class

Enumerator class

Implements IEnumerator interface that enables enumeration of elements of an Array object. 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 Enumerator : public virtual System::Object,
                   public System::Collections::Generic::IEnumerator<T>

Methods

MethodDescription
Enumerator(const SharedPtr<Array<T>>&)Constructs a new Enumerator object that represents the specified array.
get_Current() const overrideReturns a copy of the current element.
MoveNext() overrideChecks if the current element’s index does not point to the last element in the array and advances it if id does not.
Reset() overrideResets the current element’s index.
virtual ~Enumerator()Destructor.

See Also