Sign in Join
FPDoc Onlineexperiment

IEnumerator.GetCurrent function

Member of IEnumeratorIn unit System

Returns the current element in the iteration cycle.

Declaration

pascal
function GetCurrent: TObject

Description

getCurrent should return the object instance representing the current value in the for in loop. GetCurrent will always be called immediately after MoveNext returned True.

The actual return type of the interface should not necessarily be TObject, it can be any type. The compiler will check the actual return type with the type of the loop variable, and they should match.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.