title: Returning ArrayList from Function/Script
body: <p>Given the following script:</p>
  
  <pre><code>function f {
      [CmdletBinding()]Param()
      Write-Verbose 'f: Start'
      $t = New-Object 'System.Collections.ArrayList'
      Write-Verbose $t.GetType().Name
      return $t
  }
  
  $things = New-Object 'System.Collections.ArrayList'
  $things.GetType().Name
  $things = f -verbose
  $things.GetType().Name
  </code></pre>
  
  <p>Why wouldn't the <code>$things</code> be-of-type <code>ArrayList</code> at the final line?</p>