# Switch Expressions and the Conditional Operator

Choose a value, rather than run a block, with C#'s conditional operator for two choices and a switch expression for many.

![Cheat sheet: Switch Expressions and the Conditional Operator](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/6df9546e5e404f6c8b389b111953301d.webp)

- Category: C#
- Level: Apprentice
- Tags: c-sharp, Pattern Matching (c-sharp), switch Expression, Ternary Operator (c-sharp)
- Updated: November 3, 2026

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