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

IEnumerator.GetCurrent

Returns the current element in the iteration cycle

Declaration

Source position: objpash.inc line 260

function IEnumerator.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 IEnumerator.MoveNext returned True.

Remark: 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

IEnumerator.MoveNext

  

Move to the next value

IEnumerator.Reset

  

Reset the pointer


Documentation generated on: Nov 14 2015