Created
December 29, 2020 15:33
-
-
Save ivanignatiev/6e347d7a302c3567de562f085c3c6f0b to your computer and use it in GitHub Desktop.
Test: PowerShell Hashtables Merge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-HashtablePartOne { | |
return @{ | |
"a" = "a_value" | |
"c" = "c_value" | |
} | |
} | |
function Get-HashtablePartTwo { | |
return @{ | |
"b" = "b_value" | |
"d" = "d_value" | |
} | |
} | |
$testHashtable = New-Object System.Collections.Hashtable | |
$testHashtable += Get-HashtablePartOne | |
$testHashtable += Get-HashtablePartTwo | |
$testHashtable | |
$testHashtable["a"] | |
$testHashtable["b"] | |
$testHashtable["c"] | |
$testHashtable["d"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment