1
試圖讓我的switch語句與「-or」操作符一起工作.. 我在做什麼錯了?Powershell switch語句不能與or-operator一起使用
代碼:
PS C:\Windows\system32> $a = 1031
PS C:\Windows\system32> switch ($a) {1031 {write "True"}}
True
PS C:\Windows\system32>
PS C:\Windows\system32>
PS C:\Windows\system32> switch ($a) {((1031) -or (2055)) {write "True"}}
PS C:\Windows\system32>