this code work
function a
{
b {
write-host 'hello'
}
}
function b
{
param([scriptblock]$sb)
&$sb
}
but this don't work because the character {
function a
{
b
{
write-host 'hello'
}
}
function b
{
param([scriptblock]$sb)
&$sb
}
PS C:\> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-rc.2
PSEdition Core
GitCommitId v6.0.0-rc.2
OS Microsoft Windows 6.3.9600
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
this code work
but this don't work because the character {