September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,4 +1,4 @@
|
|||
$hashtable = @{
|
||||
"key1" = "value 1"
|
||||
"key2" = 5
|
||||
key2 = 5 # if the key name has no spaces, no quotes are needed.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,20 @@
|
|||
$hashtable.key1 # value 1
|
||||
$hashtable['key2'] # 5
|
||||
# Case insensitive keys, both end up as the same key:
|
||||
$h=@{}
|
||||
$h['a'] = 1
|
||||
$h['A'] = 2
|
||||
$h
|
||||
|
||||
Name Value
|
||||
---- -----
|
||||
a 2
|
||||
|
||||
# Case sensitive keys:
|
||||
$h = New-Object -TypeName System.Collections.Hashtable
|
||||
$h['a'] = 1
|
||||
$h['A'] = 2
|
||||
$h
|
||||
|
||||
Name Value
|
||||
---- -----
|
||||
A 2
|
||||
a 1
|
||||
|
|
|
|||
|
|
@ -1,6 +1,2 @@
|
|||
$addressObj= "" | Select-Object nameStr,street1Str,street2Str,cityStr,stateStr,zipStr
|
||||
$addressObj.nameStr = [string]"FirstName LastName"
|
||||
$addressObj.street1Str= [string]"1 Main Street"
|
||||
$addressObj.cityStr= [string]"Washington DC"
|
||||
$addressObj.stateStr= [string]"DC"
|
||||
$addressObj.zipStr= [string]"20009"
|
||||
$hashtable.key1 # value 1
|
||||
$hashtable['key2'] # 5
|
||||
|
|
|
|||
|
|
@ -0,0 +1,4 @@
|
|||
$obj = [PSCustomObject]@{
|
||||
"key1" = "value 1"
|
||||
key2 = 5
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue