Converting the Dictionary Object's Add Method


Windows PowerShell


Definition: Adds a key/item pair.

Add

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

Show: