5
我想做[string]::Join(", ", $HashTable.Keys);
但返回System.Collections.Hashtable+KeyCollection...
而不是枚舉值。將哈希表中的鍵轉換爲字符串列表
我需要爲此做一個foreach循環嗎?
我想做[string]::Join(", ", $HashTable.Keys);
但返回System.Collections.Hashtable+KeyCollection...
而不是枚舉值。將哈希表中的鍵轉換爲字符串列表
我需要爲此做一個foreach循環嗎?
你可以簡單地做:
$HashTable.Keys -join ','