Powershell-Do..While循环

下面的脚本演示了Powershell中的do..while循环。

> $array = @("item1", "item2", "item3")
$counter = 0;

do {
   $array[$counter]
   $counter += 1
} while($counter -lt $array.length)
 
item1
item2
item3
日期:2019-08-20 13:51:11 来源:oir作者:oir