Skip to content

Instantly share code, notes, and snippets.

@bielawb
Created May 11, 2020 21:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bielawb/6dae18ae4f3cca3ef8565cf98b6a0a05 to your computer and use it in GitHub Desktop.
Save bielawb/6dae18ae4f3cca3ef8565cf98b6a0a05 to your computer and use it in GitHub Desktop.
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