TStringList.Count

From Soldat Community Wiki
Jump to: navigation, search
property Count: Integer
 Access mode: R

Description

Number of strings in the TStringList. Note that the highest index used is Count-1.

Example

var
  s: TStringList;
  i: Integer;

begin
  s := File.CreateStringList();
  s.Append('a');
  s.Append('b');
  s.Append('c');
  
  for i:=0 to s.Count-1
    WriteLn('s.['+inttostr(i)+'] = '+s[i]);
  
  s.Free;
end.