Information Technology Reference
In-Depth Information
The general flow of control through a
switch
statement is illustrated in Figure 9-4. You can
modify the flow through a
switch
statement with a
goto
statement or a
return
statement.
Figure 9-4.
The flow of control through a switch statement
■
Note
Unlike C and C++, each switch section must end with a
break
or
return
statement. In C#, there
is no
falling through
from one switch section to the next.