Sign in Join
FPDoc Onlineexperiment

TStrings.Count property

Member of TStringspublicIn unit Classes

Number of strings in the list.

Declaration

pascal
property Count: Integer read GetCount;

Description

Count is the current number of strings in the list. TStrings does not implement this property; descendant classes should override the property read handler to return the correct value.

Strings in the list are always uniquely identified by their Index; the index of a string is zero-based, i.e. it's supported range is 0 to Count-1. trying to access a string with an index larger than or equal to Count will result in an error. Code that iterates over the list in a stringlist should always take into account the zero-based character of the list index.

See also

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