?:) that I have in C++, C#, JavaScript and likewise but not in PowerShell.A quick workaround is the subexpression (
$()) in a string surrounded by ".$ref = 'blue'
"The color is $(if ($ref -eq 'blue'){''} else{'not '})blue."The output is
The color is blue.If the $ref value is changed
$ref = 'yellow'The output is
The color is not blue.
No comments:
Post a Comment