TStrings.AddPair
Add a name-value pair
Declaration
Source position: classesh.inc line 705
public
function AddPair(const AName: string; const AValue: string) : TStrings
; Overload;
function AddPair(const AName: string; const AValue: string;
AObject: TObject) : TStrings; Overload;
Description
AddPair adds a Name=Value pair with the AName and AValue parameters, optionally with object AObject. It uses the correct NameValueSeparator]() character to do so.
AddPair does not test whether aName already exists, so it is possible to add duplicate names.
Errors
None.
See also
Name | Description |
---|---|
TStrings.Add | Add a string to the list |
TStrings.AddObject | Add a string and associated object to the list. |
TStrings.GetNameValue | Return both name and value of a name,value pair based on it's index. |
TStrings.NameValueSeparator | Value of the character used to separate name,value pairs |