首页 > 代码库 > switch

switch

$num = 22
switch ($num)
{
1
{Write-Host "this is 1";break}
2
{Write-Host "this is 2"
1+2
break
}
default
{Write-Host "cpp";break}
}