PowerShell inline If (IIf)

后端 未结 7 1878
独厮守ぢ
独厮守ぢ 2020-12-07 16:24

How do I create an a statement with an inline If (IIf, see also: Immediate if or ternary If) in PowerShell?

If you also think that this should be a native Po

相关标签:
7条回答
  • 2020-12-07 17:19

    Here is another way:

    $condition = $false
    
    "The condition is $(@{$true = "true"; $false = "false"}[$condition])"
    
    0 讨论(0)
提交回复
热议问题