I declare an ArrayList using:
[System.Collections.ArrayList]$arr = @("foo", "bar", "some", "string")
..Then verify its type:
$arr.GetType()
But inserting a new value, using Insert() returns an error:
$arr.Insert("anotherstring")
Cannot find an overload for "Insert" and the argument count: "1".
What does this error message mean? What is the correct format when using this method?
Is there a better way to append items to the ArrayList?