Method ToArray() is listed in .NET Framework reference but I can't access it in Powershell. Why? Are there alternatives?
EDIT:
Now I realize it's because I tried to add a value to the list with +=
as if it were an array. I wonder why it didn't work (help appreciated).
$test=New-Object -TypeName System.Collections.Generic.List[byte]
$test.Add(1)
$test.Add(2)
$test+=3
# NO $test.ToArray() METHOD (BECUASE OF $test+=3)`