Sign in Join
FPDoc Onlineexperiment

TFieldsEnumerator class

In unit DB

Default enumerator for the fields collection of a dataset.

Declaration

pascal
TFieldsEnumerator = class

Description

TFieldsEnumerator implements all the methods of IEnumerator so a TFields instance can be used in a for..in construct. TFieldsEnumerator returns all the fields in the TFields collection. Therefor the following construct is possible:

Var
  F : TField;

begin
   // ...
   For F in MyDataset.Fields do
     begin
     // F is of type TField.
     end;
   // ...

Do not create an instance of TFieldsEnumerator manually. The compiler will do all that is needed when it encounters the for..in construct.

See also

Properties

CurrentpublicReturn the current field.

Methods

CreatepublicCreate a new instance of TFieldsEnumerator.
MoveNextpublicMove the current field to the next field in the collection.

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