Prerequisites
PowerShell Version
7.6
Summary
Hey guys, I came across this feature about array splatting for binaries, essentially flattening them, and was wondering if it perhaps should be documented in about_splatting?#splatting-with-arrays:
$code = @'
using System;
for (int i = 0; i < args.Length; i++)
Console.WriteLine($"[{i}]: {args[i]}");
'@
$arguments = 1, (2, 3), 4
$code | dotnet run - -- $arguments
# [0]: 1
# [1]: 2 3
# [2]: 4
$code | dotnet run - -- @arguments
# [0]: 1
# [1]: 2
# [2]: 3
# [3]: 4
Details
No response
Proposed Content Type
About Topic
Proposed Title
No response
Related Articles
Prerequisites
Get-Foocmdlet" instead of "New cmdlet."PowerShell Version
7.6
Summary
Hey guys, I came across this feature about array splatting for binaries, essentially flattening them, and was wondering if it perhaps should be documented in about_splatting?#splatting-with-arrays:
Details
No response
Proposed Content Type
About Topic
Proposed Title
No response
Related Articles