Changes

Jump to: navigation, search

The C Sharp switch Statement

3 bytes added, 18:39, 16 January 2008
Using the switch Statement Syntax
Finally, the ''default'' section of the construct defines what should happen if none of the case statements present a match to the ''value''.
== A switch Statement Example==
With the above information in mind we may now construct a ''switch'' statement which provides the same functionality as our previous, and somewhat unwieldy ''if ... else'' construct:

Navigation menu