Web.Stencils.TWebStencilsDataVars.Add
Delphi
procedure Add(const AName: string; AObject: TObject; AOwned: Boolean); overload;
C++
HIDESBASE void __fastcall Add(const System::UnicodeString AName, System::TObject* AObject, bool AOwned)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Web.Stencils.pas Web.Stencils.hpp |
Web.Stencils | TWebStencilsDataVars |
Description
Add key-value pair.
Web.Stencils.TWebStencilsDataVars.Add inherits from System.Generics.Collections.TDictionary.Add. All content below this line refers to System.Generics.Collections.TDictionary.Add.
Add key-value pair.
Add adds a key and its corresponding value to the dictionary. Both the key and the value can be nil.
If the key already exists in the dictionary, an exception is thrown.
An OnKeyNotify event and an OnValueNotify event occur indicating that an entry was added to the dictionary.
The Items property lists all dictionary entries. You can also set and get values by indexing directly the Items property. For instance, you can set a value this way:
Items[key] := value;
Setting the value this way overwrites the value for an existing key, but does not raise an exception.
See Also
Code Examples