[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'Classes' (#fcl)

# TStringList.Insert

Overrides the TStrings.Insert method.

## Declaration

`public procedure TStringList.Insert(`
`Index: Integer;`
`const S: String`
`); override;`

## Description

Insert will insert the string S at position Index in the list. If the list is sorted, an EStringListError exception will be raised instead. Index is a zero-based position.

## Errors

If Index contains an invalid value (less than zero or larger than Count, or the list is sorted, an EStringListError exception will be raised.

## See also

TStringList.Add |  | Implements the TStrings.Add function.
TStrings.Insert |  | Insert a string in the list.
TStringList.InsertObject