RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TAbstractNamedVariants.Add Method

Adds a named Variant to the end of the list.

Pascal
function Add(const S: string; const AValue: Variant): Integer; virtual;
C++
virtual __fastcall int Add(const AnsiString S, const Variant AValue);

Call Add to add a name/Variant pair to the end of the list. Add adds a new name/Variant pair to the list with a position index equal to the value of the Count property. 

S is the name of the Variant value. This can be used to look up the value using the Values property. 

AValue is the Variant value to associate with S.

Note: Unlike setting the Values property, calling Add adds a duplicate name/Variant pair to the list if S matches the name of a Variant that is already in the list.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!