Boolean Logic and Decision Statements
Brian Gorman
0 h 44 m
Lecture Overview
In this series of lab demos, 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#
  • By the end of the course, students will know how to write code that uses Boolean logic to make decisions and execute appropriate code based on the decision.
  • Basic computer skills
  • Problem solving skills
  • Ability to think and reason logically
  • Completion of Hello World Hands on Lab
  • Completion of Introduction to Types Lab
  • Completion of Methods, Libraries, NuGet, and Debugging Lab
Lecture Modules

In this video, you will have a quick intro to the author and be introduced to what this series of demo videos will cover.

In this demo video you will discover the goals for this lab, get a refresher of boolean logic, and see how to get your environment setup for completing the lab.
In this demo, you will learn about how to use if / else if/ else and nested if decision statements to execute specific paths in code.
In this demo, you will learn about working with the switch statement to write more readable and succint code for larger logic statements.
In this demo, you will learn about the TryParse method on number types to avoid runtime errors when users enter string data where number types are expected.
Try Risk Free

Start a free trial

Skill Me Up subscriptions include unlimited access to on-demand courses with live lab lab environments with our Real Time Labs feature for hands-on lab access.

Subscription Benefits
  • Access to Real Time Lab environments and lab guides
  • Course Completion Certificates when you pass assessments