2010-11-16 4 views

Répondre

2

Je suppose que vous avez une collection, non seulement la liste (array probablement).

PS> $myList = 'first','second','third' 

Vous pouvez muter la collection par l'indexation ou tout simplement en créant nouveau tableau comme celui-ci:

PS> $myList[1] = '2nd' 
#or 
PS> $myList | % { $_.Substring(0,2) } 
    fi 
    se 
    th 
Questions connexes