It's possible to force Exit of a function Parent that call a Function Child, from function Child?
Example code:
function Parent
{
Write-Host "I'm Calling Parent Function"
Child
Write-Host "Code...Code..."
}
function Child
{
Write-Host "I'm Calling Child Function"
# END function:Parent
Write-Host "Parent Ended!"
}
PS> Parent
PS> I'm Calling Parent Function
I'm Calling Child Function
Parent Ended!
Any Idea?
Childmethod. Of course, both of these approaches would also ensureChildis also ended.Childwill always end beforeParentwill end.