function testArg { $n = 1; if($args.Count -eq 0) { "No arg!" } else { $args | foreach {"the {0} param is {1}" -f $n++, $_ } } }
-f 使用c#格化式
function testArg { $n = 1; if($args.Count -eq 0) { "No arg!" } else { $args | foreach {"the {0} param is {1}" -f $n++, $_ } } }
-f 使用c#格化式