Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 223568

Re: Switch statement and hash table

$
0
0

The trick is in the GetEnumerator method that is called.

Through that method the Switch doesn't see a hash table, but a simple object that has a Name and a Value property.

 

You can check by doing

$myhash.GetEnumerator() | Get-Member

I hope that didn't confuse you more


Viewing all articles
Browse latest Browse all 223568

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>