Skip to content

Instantly share code, notes, and snippets.

@bielawb
Created May 11, 2020
Embed
What would you like to do?
Referencje w klasach
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