-
-
Save bielawb/6dae18ae4f3cca3ef8565cf98b6a0a05 to your computer and use it in GitHub Desktop.
Referencje w klasach
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
class Foo { | |
[void] DodajElement ( | |
[hashtable]$tablica, | |
[string]$klucz, | |
[string]$wartość | |
) { | |
$tablica.Add($klucz, $wartość) | |
} | |
} | |
$mojaLista = @{} | |
$mojeFoo = [Foo]::new() | |
$mojeFoo.DodajElement( | |
$mojaLista, | |
'A', | |
'B' | |
) | |
$mojaLista.A | |
<# | |
Na wyjściu: | |
B | |
#> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment