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.

Updated

Cheat sheet: Switch Expressions and the Conditional Operator
Category
C#
Level
Apprentice
Tags
c-sharp, Pattern Matching (c-sharp), switch Expression, Ternary Operator (c-sharp)