# arraylist.ps1
# Sample re-written in PowerShell
# Author: W.Blass
# Creates and initializes a new ArrayList.
$myAL = New-Object Collections.ArrayList
[Void]$myAL.Add("Hello")
[Void]$myAL.Add("World")
[Void]$myAL.Add("!")
# Displays the properties and values of the ArrayList.
'myAl'
write-host "Count : " $myAL.count
write-host "Capacity : " $myAL.Capacity
write-host "$myAl"
######
#This code produces output similar to the following:
#myAL
# Count: 3
# Capacity: 4
# Values: Hello World !
######