Klonujemy wejściowe parametry
This file contains 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
$rodzic = @{ | |
A = 1 | |
} | |
function Add-Lokalnie { | |
param ( | |
[hashtable]$OdRodzica | |
) | |
$potomna = $OdRodzica.Clone() | |
$potomna.Add(1, 2) | |
"Klucze lokalnie: $($potomna.Keys)" | |
} | |
"Klucze przed: $($rodzic.Keys)" | |
Add-Lokalnie -OdRodzica $rodzic | |
"Klucze po: $($rodzic.Keys)" | |
<# | |
Na wyjściu: | |
Klucze przed: A | |
Klucze lokalnie: A 1 | |
Klucze po: A | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment