TStringList.Count

From Soldat Community Wiki
Revision as of 17:08, 24 August 2013 by Mighty (talk | contribs) (new page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.