1010#>
1111
1212# <snippet00>
13- # Create new hash table using PowerShell syntax
13+ # Create new hash table using PowerShell syntax.
1414$OpenWith = @ {}
1515
16- # Add one element to the hash table using the Add method
16+ # Add one element to the hash table using the Add method.
1717$OpenWith.Add (' txt' , ' notepad.exe' )
1818
19- # Add three eleements using PowerShell syntax three different ways
19+ # Add three elements using PowerShell syntax three different ways.
2020$OpenWith.dib = ' paint.exe'
2121
2222$KeyBMP = ' bmp'
2323$OpenWith [$KeyBMP ] = ' paint.exe'
2424
2525$OpenWith += @ {' rtf' = ' wordpad.exe' }
2626
27- # Display hash table
27+ # Display hash table.
2828" There are {0} in the `$ OpenWith hash table as follows:" -f $OpenWith.Count
2929' '
3030
31- # Display hashtable properties
31+ # Display hashtable properties.
3232' Count of items in the hashtable : {0}' -f $OpenWith.Count
3333' Is hashtable fixed size? : {0}' -f $OpenWith.IsFixedSize
3434' Is hashtable read-only? : {0}' -f $OpenWith.IsReadonly
35- ' Is hashtabale synchronised? : {0}' -f $OpenWith.IsSynchronized
35+ ' Is hashtable synchronised? : {0}' -f $OpenWith.IsSynchronized
3636' '
3737' Keys in hashtable:'
3838$OpenWith.Keys
@@ -46,17 +46,17 @@ This script produces the following output:
4646
4747There are 4 in the $OpenWith hash table as follows:
4848
49- Name Value
50- ---- -----
51- txt notepad.exe
52- dib paint.exe
53- bmp paint.exe
54- rtf wordpad.exe
49+ Name Value
50+ ---- -----
51+ txt notepad.exe
52+ dib paint.exe
53+ bmp paint.exe
54+ rtf wordpad.exe
5555
5656Count of items in the hashtable : 4
5757Is hashtable fixed size? : False
5858Is hashtable read-only? : False
59- Is hashtabale synchronised? : False
59+ Is hashtable synchronised? : False
6060
6161Keys in hashtable:
6262txt
@@ -70,4 +70,4 @@ paint.exe
7070paint.exe
7171wordpad.exe
7272#>
73- # </snippet00>
73+ # </snippet00>
0 commit comments