Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Converting the Dictionary Object's Add Method

Windows PowerShell

Definition: Adds a key/item pair.


You can add key/item pairs when you create the hash table. You can also add more key/item pairs using the Add method. Here we’re adding the key chicken with the corresponding item meat to the $food hash table:

$food.Add("chicken", "meat")

See conversions of other Dictionary object methods and properties.
Return to the VBScript to Windows PowerShell home page

© 2016 Microsoft