Difference between revisions of "TStringList.Count"

From Soldat Community Wiki
Jump to: navigation, search
(new page)
 
(No difference)

Latest revision as of 18:08, 24 August 2013

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.