C# .Net Core Boolean Logic and Decision Statements
1 h 15 m
Pausable for 8 hours
Lab Overview
In this lab, you will take a deeper dive into using boolean logic to make decisions in your code. The lab will focus in on different decision controls such as if / else if / else blocks, switches, and the TryParse method for converting strings to other types. By the end of the lab, you will understand how to use boolean logic in truth statements to execute different logical algorithms in your code.

Related Learning Path(s):
Programming Fundamentals with C#
  • Solidify your knowledge of Boolean Logic
  • Understand how to work with logical decisions
  • Learn the if/else decision control
  • Experience using nested if/else logic
  • Learn about switches
  • Use a TryParse operation to check user input for type conversion
In this exercise you will discover the goals for this lab, get a refresher of boolean logic, and get your environment setup for completing the lab
In this exercise, you will learn about how to use if / else if/ else and nested if decision statements to execute specific paths in code.
In this exercise, you will learn about working with the switch statement to write more readable and succint code for larger logic statements.
In this exercise, you will learn about the TryParse method on number types to avoid runtime errors when users enter string data where number types are expected.
Real-Time Lab
Not Registered?
Create Account
Already Registered?
What are Labs?

Labs provide a live environment to get hands-on experience using the same tools and services in the real world.

Learn More