Skip to content

Glossary: C# Basics

switch

Also written: switch statement, case, default

A statement that compares one value against a list of fixed choices. C# jumps to the matching `case`, which ends with `break`, and `default` runs when nothing matches.

Where the book teaches it

Related terms

breakelse if