【发布时间】:2016-02-06 02:25:53
【问题描述】:
PS C:\Users\Hind> $b=@{}
PS C:\Users\Hind> $b+={k="a";v="b"}
A hash table can only be added to another hash table.
At line:1 char:1
+ $b+={k="a";v="b"}
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : AddHashTableToNonHashTable
为什么会失败?如何成功地将一个元素添加到哈希表?
【问题讨论】:
标签: powershell hashtable element