[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Classes' (#rtl)

# TComponent.GetEnumerator

Create an IEnumerator instance

## Declaration

Source position: classesh.inc line 1969

`public function TComponent.GetEnumerator: TComponentEnumerator;`

## Description

GetEnumerator is the implementation of the IEnumerable interface for TComponent. It creates a TComponentEnumerator instance and returns it's IEnumerator interface. The enumerator enumerates all child components of the component instance.

## See also

TComponentEnumerator |  | Implements IEnumerator for the TComponent class.
IEnumerator |  | Enumerator support interface
IEnumerable |  | Interface to retrieve an enumerator from a class.

Documentation generated on: May 14 2021