TStringList.Strings

From Soldat Community Wiki
Jump to: navigation, search
property Strings[i: Integer]: String
 Access mode: RW

Description

Strings is the default property of TStringList. It provides indexed read-write access to the list of strings. Reading it will return the string at position i in the list. Writing it will set the string at position i.

i is the position of the string in the list. It is zero-based, i.e. valued values range from 0 (the first string in the list) till Count-1 (the last string in the list). When browsing through the strings in the list, this fact must be taken into account. If i is out of range when trying to read, error will occur.

To access the objects associated with the strings in the list, use the Objects property. The name parts of name-value pairs can be accessed with the Names property, and the values can be set or read through the Values property.

Searching through the list can be done using the IndexOf method.