Skip to content

Instantly share code, notes, and snippets.

@jaredpar
Created October 15, 2015 17:39
Show Gist options
  • Save jaredpar/302be1e7b7fcf4d983a8 to your computer and use it in GitHub Desktop.
Save jaredpar/302be1e7b7fcf4d983a8 to your computer and use it in GitHub Desktop.
Powershell array member access
> $a = new-object System.Collections.Queue
> $a.enqueue($null)
> $a.enqueue($null)
> $a.enqueue($null)
> $a.enqueue($null)
> $a.enqueue($null)
> $a
> $a.Count
5
> $b = @($null)
> $b.Count
1
> $b = @($a)
> $b.Count
5
> $b.add($null)
> $b = @($a, $null)
> $b.Count
2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment