System.IEnumerator

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

IEnumerator = interface(IInterface)
IEnumerator<T> = interface(IEnumerator)

C++

__interface IEnumerator  : public IInterface
template<typename T> __interface IEnumerator__1  : public IEnumerator

Properties

Type Visibility Source Unit Parent
interface
class
public
System.pas
System.hpp
System System

Description

IEnumerator is the generic interface for container enumerators.

Implement the IEnumerator interface in the class that has to act as an enumerator for a container. An IEnumerator is usually obtained by a call to the container's GetEnumerator method.

Classes that implement the IEnumerator interface are considered enumerators in Object Pascal language and are used automatically by the for..in statement.

Note: It is not required that IEnumerator be actually implemented by a class in order to be considered an enumerator. It is enough to simply implement the required methods in your class. Still, we recommend that you implement the IEnumerator interface.

See Also