# Conditional Logic in C#

Conditional Logic in C#: If, Multiple Conditions, Switch, Switch Expressions and the Conditional Operator.

Updated: November 3, 2026

1. [If](https://www.ask-codey.com/lessons/conditional-logic-in-csharp-if) (Novice): Run code only when a condition is true, with if, if-else and else if, and write conditions with C#'s comparison operators.
2. [Multiple Conditions](https://www.ask-codey.com/lessons/conditional-logic-in-csharp-multiple-conditions) (Apprentice): Combine conditions with && (and), || (or) and ! (not), and group them with parentheses so they mean what you intend.
3. [Switch](https://www.ask-codey.com/lessons/conditional-logic-in-csharp-switch) (Apprentice): 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.
4. [Switch Expressions and the Conditional Operator](https://www.ask-codey.com/lessons/conditional-logic-in-csharp-switch-expressions) (Apprentice): Choose a value, rather than run a block, with C#'s conditional operator for two choices and a switch expression for many.

Source: https://www.ask-codey.com/courses/csharp-full-stack-bootcamp/topics/conditional-logic-in-csharp
