TStrings.Count

Number of strings in the list.

Declaration

Source position: classesh.inc line 770

public Property
  Count : Integer;

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

Name Description
Integer A signed 16-bits integer
TStrings.Capacity Capacity of the list, i.e. number of strings that the list can currently hold before it tries to expand.
TStrings.Objects Indexed access to the objects associated with the strings in the list.
TStrings.Strings Indexed access to the strings in the list.