# Switch

Pick one of many blocks of code by the value of a single variable with C#'s switch statement, including shared cases and a default.

![Cheat sheet: Switch](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/b0e2c68898fc49649add2708ea37d36c.webp)

- Category: C#
- Level: Apprentice
- Tags: break (c-sharp), c-sharp, switch Statement (c-sharp)
- Updated: November 3, 2026

Source: https://www.ask-codey.com/cheat-sheets/conditional-logic-in-csharp-switch-cheat-sheet
