Contents

Properties

Description

References the strings in the list by their positions.

Descendants of TStrings must implement an accessor function for the Strings property to return the string at the position indicated by Index. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on.

Use the Strings property to get or set the string at a particular position.

To store a string as a name-value pair, assign Strings a value that includes the NameValueSeparator character. The name and value will then be accessible separately using the Names and Values properties.

Note: In Delphi, Strings is the default property of TStrings objects. The Strings identifier can be omitted when accessing the Strings property of a descendant of TStrings. For example, the following two lines of code are both acceptable and do the same thing:

MyStrings.Strings[0]:='This is the first string';MyStrings[0]:='This is the first string';