Selecting elements from a hashtable

Individual elements may be selected by key. A number of different formats are supported for selecting elements:

$hashtable["Key1"] 

Using dot notation:

$hashtable.Key1 

The key is not case sensitive, but it is type sensitive and will not automatically convert. For instance, consider this hashtable:

$hashtable = @{1 = 'one'} 

The value one can be selected if an integer is used as the key, but not if a string is used. That is, this works:

$hashtable.1 
$hashtable[1] 

While this does not:

$hashtable."1" 
$hashtable["1"] 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.37.154