Monday, July 8, 2013

ArryaList in Powershell

$fieldsArray = $null
$fieldsArray = New-Object 'System.Collections.Generic.List[string]';
$fieldsArray.Add("DSMB-SMC Documents1")
$fieldsArray.Add("DSMB-SMC Documents2")
$fieldsArray.Add("DSMB-SMC Documents3")
     
 Write-Host "count" $fieldsArray.count
 foreach($fieldLink in $fieldsArray){
       Write-Host    $fieldLink
      }
       

              

No comments:

Post a Comment

Followers