Is there a way to keep the order of keys in a hashtable as they were added? Like a push/pop mechanism.
Example:
$hashtable = @{}
$hashtable.Add("Switzerland", "Bern")
$hashtable.Add("Spain", "Madrid")
$hashtable.Add("Italy", "Rome")
$hashtable.Add("Germany", "Berlin")
$hashtable
I want to retain the order in which I've added the elements to the hashtable.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…