© { JSL }
73
case Notes
·
unusual syntax
w
you
can
switch
on a
string
w
fall through is illegal, even on
default
clause
w
you can
goto
a
case
/
default
label
!
void
Func(
string
option)
{
switch
(option)
{
case
"label":
goto case
"jump":
case
"jump":
goto default
;
case
"quit":
return
;
case
"spin":
for
(;;){ }
case
"unwind":
throw
new Exception();
default
:
break
;
}
}