Skip to content

TStringsEnumerator

Implements IEnumerator for the TStrings class.

Declaration

Source position: classesh.inc line 990

type

  TStringsEnumerator = class
  public
    constructor Create;
    function GetCurrent : string;
    function MoveNext : Boolean;
    property Current: string; {r}
  end;

Description

TStringsEnumerator implements the #rtl.system.IEnumerator interface for the TStrings class, so the TStrings class can be used in a for ... in loop. It is returned by the TStrings.GetEnumerator method of TStrings.

Properties

Member Visibility Description
Current read only public Current pointer in the list.

Methods

Member Visibility Description
Create public Initialize a new instance of TStringsEnumerator.
GetCurrent public Return the current pointer in the list.
MoveNext public Move the position of the enumerator to the next position in the list.

See also

Name Description
TStrings Class to manage arrays or collections of strings.
TStrings.GetEnumerator Create an IEnumerator instance.
#rtl.system.IEnumerator Enumerator support interface.