I was just playing around with hash tables and I did this:
$C = @{color = [System.Collections.ArrayList]@(@{y = 'yellow'},@{y = 'blue'})}
and I ended up with finding I can do:
($C.color.y).Get(1)
or ($C.color.y).Item(1)
and it does exactly the same thing.
I also found even though the autocomplete doesn't show you can do this you can:
($C.color.y).Get(0).Contains('yellow')
($C.color.y).Get(1).Contains('blue')
The Get
and Item
methods appear to be interchangeable what is the difference between them?
I did check the hash codes they are the same.
($C.color.y).Get(1).GetHashCode()
or ($C.color.y).Item(1).GetHashCode()