Skip to main content

5 docs tagged with "conditionals"

View all tags

Combining Loops and Conditionals

In this final article of the series, we'll see how to combine loops and conditionals to create more sophisticated programs. This is where the real power of programming begins to show.

Conditional Statements: if (Part 1)

Following our exploration of Common Built-in Types and Methods, this article delves into conditional statements, specifically the if statement. This concept is essential for writing C# code that can make decisions and execute different blocks of code based on certain conditions.

Conditional Statements: if-else (Part 2)

In our previous article, we explored the basics of the if statement. Now, we'll expand on that by introducing the else clause, which allows us to specify an alternative block of code to execute when the if condition is false.

Switch Statements and Expression

The switch statement is an alternative to the if-else if-else chain for when you have multiple conditions to check against a single value.