Converting the Dictionary Object's Add Method

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